Open
Description
Upgraded to react-rails 3.2.1 from react-rails 2.6.2 with asset pipeline
Not calling createRoot explicitly anywhere in the code. As we are using asset pipeline no package.json/webpacker/shakapacker included in the code
Using Rails 7.2.2.1 and ruby 3.4.4
application.js looks like this
//= require jquery
//= require jquery_ujs
//= require jquery-ui
//= require bootstrap-sprockets
//= require jquery-ui/widgets/datepicker
//= require react
//= require react_ujs
//= require components
//= require_tree .
but in console see the following error message
You are importing createRoot from "react-dom" which is not supported. You should instead import it from "react-dom/client"
According to https://github.com/reactjs/react-rails/pull/1269/files this should be fixed but some how react-dom is being used instead of react-dom/client , Made sure ReactDOM.version gets 18.2.0 in browser console of applciation. Not really sure how the else part is being executed.
Metadata
Metadata
Assignees
Labels
No labels