parent
85e7bb0a0c
commit
15e9dd6b25
|
@ -1,7 +1,9 @@
|
|||
/**
|
||||
* External dependencies
|
||||
*/
|
||||
import { render } from '@wordpress/element';
|
||||
// @ts-expect-error -- @wordpress/element doesn't export createRoot until WP6.2
|
||||
// eslint-disable-next-line @woocommerce/dependency-group
|
||||
import { createRoot } from '@wordpress/element';
|
||||
|
||||
/**
|
||||
* Internal dependencies
|
||||
|
@ -10,4 +12,5 @@ import WCAddonsTour from '../../guided-tours/wc-addons-tour/index';
|
|||
|
||||
const root = document.createElement( 'div' );
|
||||
root.setAttribute( 'id', 'wc-addons-tour-root' );
|
||||
render( <WCAddonsTour />, document.body.appendChild( root ) );
|
||||
|
||||
createRoot( document.body.appendChild( root ) ).render( <WCAddonsTour /> );
|
||||
|
|
|
@ -0,0 +1,4 @@
|
|||
Significance: patch
|
||||
Type: fix
|
||||
|
||||
Changed from using React.render to React.createRoot for wc addon tour as it has been deprecated since React 18
|
Loading…
Reference in New Issue