Skip to content

Commit

Permalink
Enable concurrent and strict mode in customize-widgets, too
Browse files Browse the repository at this point in the history
  • Loading branch information
jsnajdr committed Feb 2, 2023
1 parent 532b1d9 commit f0fb47f
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions packages/customize-widgets/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 { StrictMode, createRoot } from '@wordpress/element';
import {
registerCoreBlocks,
__experimentalGetCoreBlocks,
Expand Down Expand Up @@ -91,13 +91,14 @@ export function initialize( editorName, blockEditorSettings ) {
}
} );

render(
<CustomizeWidgets
api={ wp.customize }
sidebarControls={ sidebarControls }
blockEditorSettings={ blockEditorSettings }
/>,
container
createRoot( container ).render(
<StrictMode>
<CustomizeWidgets
api={ wp.customize }
sidebarControls={ sidebarControls }
blockEditorSettings={ blockEditorSettings }
/>
</StrictMode>
);
} );
}

0 comments on commit f0fb47f

Please sign in to comment.