Skip to content

Reproduction app for the root re-creation bug for react-rails using React 18

Notifications You must be signed in to change notification settings

diogobeda/react-rails-18-root-bug

Repository files navigation

Steps for reproducing

  1. Install ruby dependencies
bundle install
  1. Install js dependencies
yarn install
  1. Setup sqlite db
rails db:create
rails db:migrate
  1. Run the app
rails s
  1. Click on the "Add timer" button

You should see the previously added timers reset their local state because the React root is being re-created and the following warning on the console:

Warning: You are calling ReactDOMClient.createRoot() on a container that has already been passed to createRoot() before. Instead, call root.render() on the existing root instead if you want to update it.

About

Reproduction app for the root re-creation bug for react-rails using React 18

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published