Skip to content

Commit

Permalink
Reusable Blocks: Use React 18 APIs (#48244)
Browse files Browse the repository at this point in the history
  • Loading branch information
tyxla authored and ntsekouras committed Feb 21, 2023
1 parent 5bec561 commit dd2d905
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions packages/list-reusable-blocks/src/index.js
@@ -1,7 +1,7 @@
/**
* WordPress dependencies
*/
import { render } from '@wordpress/element';
import { createRoot } from '@wordpress/element';
import { __ } from '@wordpress/i18n';

/**
Expand Down Expand Up @@ -45,5 +45,7 @@ document.addEventListener( 'DOMContentLoaded', () => {
const container = document.createElement( 'div' );
container.className = 'list-reusable-blocks__container';
button.parentNode.insertBefore( container, button );
render( <ImportDropdown onUpload={ showNotice } />, container );
createRoot( container ).render(
<ImportDropdown onUpload={ showNotice } />
);
} );

0 comments on commit dd2d905

Please sign in to comment.