slate icon indicating copy to clipboard operation
slate copied to clipboard

Update to immer@10+ breaks react native + hermes builds

Open josephmr opened this issue 9 months ago • 0 comments

Description The update to "immer": "^10.0.3" in https://github.com/ianstormtaylor/slate/pull/5528 prevents Slate from building in react native projects that utilize the hermes engine. The newer version of immer utilizes some features which are not implemented in hermes yet.

We utilize Slate in react native to build and normalize documents that match our web application even though we don't use it to control an actual input element.

Steps To reproduce the behavior:

  1. Add Slate as a dependency to a React Native project
  2. Enable hermes engine
  3. Attempt a release build of the application

Expectation I'm unsure if Slate should take any action here. We are working around the issue by pinning immer to 9.0.21 and forcing slate to use that version. This currently works because slate hasn't updated any usages of immer so it is still compatible with 9.0.21.

This is largely an FYI issue for others. Additionally, resisting any immer 10+ backwards incompatible code might want to be avoided to continue supporting react native and older browser usages until strictly necessary.

Environment

  • Slate Version: 0.102

josephmr avatar May 01 '24 15:05 josephmr