reactjs/react-modal

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

Open

#1,019 创建于 2023年5月8日

在 GitHub 查看
 (19 评论) (0 反应) (0 负责人)JavaScript (7,294 star) (828 fork)batch import
easygood first issue

描述

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))

贡献者指南