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
Is your enhancement related to a problem? Please describe.
Instant Results, introduced in 4.x, is powered by the version of React included in WordPress by importing @wordpress/element with the WordPress dependency extraction plugin enabled. However the Synonyms editor uses a (now) older version of React that is included as an NPM dependency of the plugin.
During the development of Instant Results several React related bugs would occur when building assets with npm run watch. A possible cause of this issue is a mismatch between the version of React in WordPress and the version used as a dependency of other features. For this reason, as well as consistency and reducing the number of dependencies, I propose migrating all React-based features in the plugin to using @wordpress/element with dependency extraction.
Describe the solution you'd like
Update the Synonyms feature to use @wordpress/element with dependency extraction instead of a separate React dependency.
Remove unused React dependencies from the plugin.
Best case scenario this will be a handful of lines worth of changes to the import statements and package.json dependencies, but the results will need to be tested.
Describe alternatives you've considered
A solution could be to go in the other direction, and use our own React dependency for these features instead of what's included in WordPress, but the trouble with that approach is that with its current implementation Instant Results uses other WordPress libraries built on top of @wordpress/element, such as SlotFills, that will require whichever version of React is included in WordPress.
The text was updated successfully, but these errors were encountered:
As noticed on #2631, custom search results will need to replace react-beautiful-dnd before it can be updated to use the version of React in WordPress, which is no longer compatible as of 5.9.
Is your enhancement related to a problem? Please describe.
Instant Results, introduced in 4.x, is powered by the version of React included in WordPress by importing
@wordpress/element
with the WordPress dependency extraction plugin enabled. However the Synonyms editor uses a (now) older version of React that is included as an NPM dependency of the plugin.During the development of Instant Results several React related bugs would occur when building assets with
npm run watch
. A possible cause of this issue is a mismatch between the version of React in WordPress and the version used as a dependency of other features. For this reason, as well as consistency and reducing the number of dependencies, I propose migrating all React-based features in the plugin to using@wordpress/element
with dependency extraction.Describe the solution you'd like
@wordpress/element
with dependency extraction instead of a separate React dependency.Best case scenario this will be a handful of lines worth of changes to the import statements and package.json dependencies, but the results will need to be tested.
Describe alternatives you've considered
A solution could be to go in the other direction, and use our own React dependency for these features instead of what's included in WordPress, but the trouble with that approach is that with its current implementation Instant Results uses other WordPress libraries built on top of
@wordpress/element
, such as SlotFills, that will require whichever version of React is included in WordPress.The text was updated successfully, but these errors were encountered: