Skip to content

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

@josephmr

Description

@josephmr

Description
The update to "immer": "^10.0.3" in #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

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions