You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
My app crashes with react-rails, so I've included the stack trace and the exact steps which make it crash.
My app doesn't crash, but I'm getting unexpected behavior. So, I've described the unexpected behavior and suggested a new behavior.
I'm trying to use react-rails with another library, but I'm having trouble. I've described my JavaScript management setup (eg, Sprockets, Webpack...), how I'm trying to use this other library, and why it's not working.
I have another issue to discuss.
There was a previous issue (#607) where Turbolinks was causing multiple copies of react to be loaded.
This has since been fixed, but in the latest version of react-rails (v2.2.0) and using the latest webpacker gem (v2.0) I am again seeing the same warning message:
Warning: unmountComponentAtNode(): The node you're attempting to unmount was rendered by another copy of React.
I have tried turning Turbolinks caching off, but that did not resolve the issue. The issue occurs when navigating to a page with a react component from a page with a react component, then back to the original page with the original component.
To reproduce locally you'll need to log in and post a message from the main index page. Doing this will create a "conversation" by adding a conversation component to a list component. Clicking into that conversation, then back to the home page, then back into the conversation will trigger the warning.
Edit: Moving my pack that sets up ReactRailsUJS into the <head> fixed this. I'm not sure if that's supposed to be required or not. If it is then this issue can be closed, and maybe we can add something to the docs about that requirement.
The text was updated successfully, but these errors were encountered:
@rmosolgo Sure thing. I had deleted it after moving the script to the head tag, but I just restored the branch and returned it to a state that demo's the warning message.
Help us help you! Please choose one:
react-rails
, so I've included the stack trace and the exact steps which make it crash.react-rails
with another library, but I'm having trouble. I've described my JavaScript management setup (eg, Sprockets, Webpack...), how I'm trying to use this other library, and why it's not working.There was a previous issue (#607) where Turbolinks was causing multiple copies of react to be loaded.
This has since been fixed, but in the latest version of react-rails (v2.2.0) and using the latest webpacker gem (v2.0) I am again seeing the same warning message:
Warning: unmountComponentAtNode(): The node you're attempting to unmount was rendered by another copy of React.
I have tried turning Turbolinks caching off, but that did not resolve the issue. The issue occurs when navigating to a page with a react component from a page with a react component, then back to the original page with the original component.
I have a project and branch example where this is occurring:
https://github.com/zacharyw/rcg/tree/enchancement/es6
To reproduce locally you'll need to log in and post a message from the main index page. Doing this will create a "conversation" by adding a conversation component to a list component. Clicking into that conversation, then back to the home page, then back into the conversation will trigger the warning.
Edit: Moving my pack that sets up ReactRailsUJS into the
<head>
fixed this. I'm not sure if that's supposed to be required or not. If it is then this issue can be closed, and maybe we can add something to the docs about that requirement.The text was updated successfully, but these errors were encountered: