Action - Body
This the action where you'll add any app content (such as a React root element). This is basically where all HTML goes that is in the body tag (minus script tags).
Example. Say I've got a React app and all I need (minus my scripts) is a single div for my app to instantiate itself:
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
add_action('body', function() { | |
echo '<div id="app"></div>'; | |
}); |