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 committed Feb 21, 2023
1 parent 54e61e8 commit 1bc75d5
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions packages/list-reusable-blocks/src/index.js
Original file line number Diff line number Diff line change
@@ -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 } />
);
} );

1 comment on commit 1bc75d5

@github-actions
Copy link

@github-actions github-actions bot commented on 1bc75d5 Feb 21, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Flaky tests detected in 1bc75d5.
Some tests passed with failed attempts. The failures may not be related to this commit but are still reported for visibility. See the documentation for more information.

🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/4230393751
📝 Reported issues:

Please sign in to comment.