You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
React can only be present once on a page. Therefor, in WP, we are reliant on whatever version is included there.
To make this happen we have this configured as external, plus use the WP element package.
However, WP element is set to an older version in our code. This version still uses React 16.
For our built code this does not matter, due to the external. But for our tests, it does.
It turns out our tests start failing if we upgrade WP element to a version that is used in WP 6.2 (see #20003)
This issue is meant to tackle our JS tests, to let them work with React 17 or even 18.
Bonus points for upgrading our React version in the process.
Problem: JS lint test doesn't recognise import of createReduxStore and register from @wordpress/data.
Possible reason: We are not bundling @wordpress/data in the zip, and we rely on window object instead.
Temporary solution: We added ignore lint comment for that import in both packages/js/src/settings/store/index.js and packages/js/src/academy/store/index.js. Search for import/named for other instances.
React can only be present once on a page. Therefor, in WP, we are reliant on whatever version is included there.
To make this happen we have this configured as external, plus use the WP element package.
However, WP element is set to an older version in our code. This version still uses React 16.
For our built code this does not matter, due to the external. But for our tests, it does.
It turns out our tests start failing if we upgrade WP element to a version that is used in WP 6.2 (see #20003)
This issue is meant to tackle our JS tests, to let them work with React 17 or even 18.
Bonus points for upgrading our React version in the process.
Some more tech info:
nohoist
hereThe text was updated successfully, but these errors were encountered: