Skip to content

Add support for React & Node 18 (as easy as adding startTransition() on each setState) #1019

Description

@AnderUstarroz

Summary:

Current react modal doesn't work with latest version of React + Node v18

Steps to reproduce:

  1. Use react-modal with latest React's and Node v18

Expected behavior:

Should work normally

Example of issue:

Breaks with the following error message:
Screenshot 2023-05-08 at 15 42 54

Solution:

Simply add startTransition() wrapping each of the calls for setting the state.
startTransition(() => setState("something))

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions