Skip to content

Instantly share code, notes, and snippets.

@codearryaas
Created August 7, 2020 16:35
Show Gist options
  • Select an option

  • Save codearryaas/8b5d78642635e86ae895feca72c1c350 to your computer and use it in GitHub Desktop.

Select an option

Save codearryaas/8b5d78642635e86ae895feca72c1c350 to your computer and use it in GitHub Desktop.

Revisions

  1. codearryaas created this gist Aug 7, 2020.
    12 changes: 12 additions & 0 deletions index.js
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,12 @@
    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'));
    }
    });