PluginProbe
TablePress – Tables in WordPress made easy / 3.0
TablePress – Tables in WordPress made easy v3.0
3.3.4 3.3.3 3.3.2 3.3.1 trunk 1.12 1.14 1.9.2 2.0.4 2.1.7 2.1.8 2.2 2.2.1 2.2.2 2.2.3 2.2.4 2.2.5 2.3 2.3.1 2.3.2 2.4 2.4.1 2.4.2 2.4.3 2.4.4 All 44 releases
← All changes | admin/js/common/react-loader.js +7 -10 trunk3.0 View file →
@@ -11,9 +11,8 @@
11 11 * WordPress dependencies.
12 12 */
13 13 import { StrictMode } from 'react';
14 14 import { createPortal, createRoot } from 'react-dom';
15 -import domReady from '@wordpress/dom-ready';
16 15 import { addFilter } from '@wordpress/hooks';
17 16
18 17 /**
19 18 * Initializes a React component on the page.
@@ -21,18 +20,16 @@
21 20 * @param {string} rootId HTML ID of the root element for the component.
22 21 * @param {Component} Component JSX component.
23 22 */
24 23 export const initializeReactComponent = ( rootId, Component ) => {
25 - domReady( () => {
26 - if ( process.env.DEVELOP ) {
27 - Component = <StrictMode>{ Component }</StrictMode>;
28 - }
24 + if ( process.env.DEVELOP ) {
25 + Component = <StrictMode>{ Component }</StrictMode>;
26 + }
29 27
30 - const root = document.getElementById( rootId );
31 - if ( root ) {
32 - createRoot( root ).render( Component );
33 - }
34 - } );
28 + const root = document.getElementById( rootId );
29 + if ( root ) {
30 + createRoot( root ).render( Component );
31 + }
35 32 };
36 33
37 34 /**
38 35 * Initializes a React component on the page, in a React Portal, and registers its meta box.