In JavaScript console on the Location Details page:
Description
[Error] Warning: ReactDOM.render is no longer supported in React 18. Use createRoot instead. Until you switch to the new API, your app will behave as if it’s running React 17. Learn more: https://reactjs.org/link/switch-to-createroot
printWarning (react-dom.js:73)
error (react-dom.js:47)
render (react-dom.js:29680)
(anonymous function) (script.js:101:67958)
Global Code (script.js:101:68032)
Research
Looks like this is originating from: store-locator-plus/build/slp_adminheader/script.js
That is the build output from a wp-scripts build command that is stored at (PhpStorm Content Root for the WordPress part of the project): WordPress/wp-content/plugins/store-locator-plus/build/slp_adminheader/script.js
The source file comes from: WordPress/wp-content/plugins/store-locator-plus/src/slp_adminheader/script.js
ALong with the block.json in the same directory.
_ If you look in that script file you will find the render method as imported from @wordpress/element which is now marked as deprecated. _
We may need to update the @wordpress package in this project.
I’ve manually set the package.json for the store-lcoator-plus to use 6.43.0
It may be prudent to review the @wordpress/element documentation or at least the local node library files (/Users/lancecleveland/phpStorm Projects/WordPress/wp-content/plugins/store-locator-plus/node_modules) for more information before proceeding.
__
Your MySLP dashboard plugin discovery is a red herring and can be ignored.
AI Summary / Resolution
## Topic Summary
This chat migrated deprecated React mount usage away from `render()` toward `createRoot()` in WordPress plugin entrypoints. The completed work covered `store-locator-plus` and `slp-power`, with `myslp-dashboard` identified as the remaining legacy candidate.
## Topic Details
The main issue was React 18 / `@wordpress/element` deprecation noise caused by plugin entrypoints still importing `render`. Initial investigation briefly surfaced `myslp-dashboard`, but the user clarified the active warning path was `store-locator-plus/build/slp_adminheader/script.js`, sourced from `WordPress/wp-content/plugins/store-locator-plus/src/slp_adminheader/script.js`. Local inspection of `store-locator-plus/node_modules/@wordpress/element` confirmed that `render` is still exported in `@wordpress/element@6.43.0` but is explicitly deprecated since WordPress 6.2.0 in favor of `createRoot`; updating package versions alone does not eliminate the warning if source code still imports `render`.
Two plugin repos were updated. In `store-locator-plus`, the `slp_adminheader` entrypoint was converted to `domReady()` + `createRoot()` with root reuse on the mount node, then the plugin version was bumped from `2604.06.01` to `2604.06.02` in both the main plugin PHP file and `readme.txt`, and `npm run build` regenerated build outputs. A sibling scan across `WordPress/wp-content/plugins/*` found one more modern-source hit in `slp-power/src/reports.js`; that repo was switched from `staging` to `develop` via the start-revision pattern, updated with the same `createRoot()` migration, bumped from `2604.06.01` to `2604.06.02`, and rebuilt. `myslp-dashboard` still contains older legacy `react-dom` mount code under `assets/scripts/src/locations*`, but was not changed in this session.
## Results
- completed_changes:
- `WordPress/wp-content/plugins/store-locator-plus/src/slp_adminheader/script.js`
- added JS headstone `2604.06.02`
- replaced `import {render} from '@wordpress/element'` with `domReady` + `createRoot`
- used guard-clause mount style: `if (!container) { return; }`
- cached root on container via `ROOT_INSTANCE_KEY = '__slpAdminHeaderRoot__'`
- `WordPress/wp-content/plugins/store-locator-plus/store-locator-plus.php`
- `Version: 2604.06.01 -> 2604.06.02`
- `WordPress/wp-content/plugins/store-locator-plus/readme.txt`
- `Stable tag: 2604.06.01 -> 2604.06.02`
- rebuilt `store-locator-plus` with `npm run build`
- regenerated `build/slp_adminheader/script.js`
- regenerated `build/slp_adminheader/script.asset.php`
- build also refreshed `build/slp_info_react/*` and `build/slp_style/*` as normal side effect of full plugin build
- completed_changes:
- `WordPress/wp-content/plugins/slp-power/src/reports.js`
- added JS headstone `2604.06.02`
- replaced `import {render} from '@wordpress/element'` with `domReady` + `createRoot`
- cached root on container via `ROOT_INSTANCE_KEY = '__slpPowerReportsRoot__'`
- `WordPress/wp-content/plugins/slp-power/slp-power.php`
- `Version: 2604.06.01 -> 2604.06.02`
- `WordPress/wp-content/plugins/slp-power/readme.txt`
- `Stable tag: 2604.06.01 -> 2604.06.02`
- start-revision pattern executed:
- repo root resolved directly from plugin path
- repo moved from `staging` to `develop`
- `git pull` returned already up to date
- rebuilt `slp-power` with `npm run build`
- regenerated `build/reports.js`
- regenerated `build/reports.asset.php`
- verification:
- local `@wordpress/element` docs/source inspected:
- `node_modules/@wordpress/element/README.md`
- `node_modules/@wordpress/element/src/react-platform.js`
- confirmed `render` / `hydrate` / `unmountComponentAtNode` are deprecated, `createRoot` / `hydrateRoot` are current
- `php -l` passed for:
- `WordPress/wp-content/plugins/store-locator-plus/store-locator-plus.php`
- `WordPress/wp-content/plugins/slp-power/slp-power.php`
- repo scans after edits confirmed:
- no remaining `import {render} from '@wordpress/element'` in `store-locator-plus/src`
- no remaining `import {render} from '@wordpress/element'` in `slp-power/src`
- build_warnings:
- both plugins emitted only non-blocking warnings:
- outdated `caniuse-lite` / Browserslist notice
- webpack asset-size/performance warnings