Created
August 7, 2020 16:35
-
-
Save codearryaas/8b5d78642635e86ae895feca72c1c350 to your computer and use it in GitHub Desktop.
Start Point for react.
This file contains 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
import { render } from '@wordpress/element' | |
import domReady from '@wordpress/dom-ready'; | |
const App = () => { | |
return <>Welcome to WP react Tuts</> | |
} | |
domReady(function () { | |
if ('undefined' !== typeof document.getElementById('wp-react-plugin-test-app') && null !== document.getElementById('wp-react-plugin-test-app')) { | |
render(<App />, document.getElementById('wp-react-plugin-test-app')); | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment