reactjs/react-modal

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

Ouverte

#1 019 ouverte le 8 mai 2023

 (19 commentaires) (0 réaction) (0 personne assignée)JavaScript (828 forks)batch import
easygood first issue

Métriques du dépôt

Stars
 (7 294 étoiles)
Métriques de merge PR
 (Métriques PR en attente)

Description

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:

Solution:

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

Guide contributeur