-
Notifications
You must be signed in to change notification settings - Fork 756
React component doesn't work with jquery3
#762
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Hi! thanks for sharing that screencast. Looking at the jQuery 3 upgrade guide, it looks like there were several changes to event handlers. I guess we should
Maybe our usage there needs to be updated! |
My react component won't render if I have any version of jQuery required in my I tried
My component would only show if I didnt have a require for jQuery. I am seeing no errors in my console. |
Looks like if I move the jQuery require below |
@Deekor I have just documented that observation in https://github.com/reactjs/react-rails/wiki/Troubleshooting , thanks! |
From @duckworth at #742 (comment)
The problem is likely to be with this: |
fix(#762): ensure react is mounted in Jquery3
Could someone confirm it's fixed in the pre-release of the gem? |
I just tested with 2.4.4 and can confirm that I no longer need to manually call ReactRailsUJS.mountComponents() Thanks! |
Thanks all for the help with this 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.When I replace
jquery
(which makes everything work fine) withjquery3
(https://github.com/rails/jquery-rails#installation), my React component is included in the final HTML, however, I can't see it in the browser itself. Also, no errors are displayed in the JS console.application.js.coffee
:➙ Screencast showing the issue
The text was updated successfully, but these errors were encountered: