PlexusJS/plexus

React 18 Support `Missing useSyncExternalStore` on initial render.

Pckool opened this issue · 1 comments

There is an issue caused by the new changes for react 18 concurrent rendering support. On the initial render of an app (tested with a nextjs SSR application) a critical error is thrown stating the app will re-rendered client side only due to this missing hook.

This is caused by the returned values not being memoized. The array syntax works fine when given a mutable array to edit (this way the array reference remains constant), but the single array syntax breaksdown when using groups, selectors, etc.

Bug fixed! The issue was being caused by some values not being mutable (mainly group inatnce)