-
-
Notifications
You must be signed in to change notification settings - Fork 632
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
Turbolinks.start(), how does it work in react_on_rails? #568
Comments
I updated some of the instructions here: #573. You want to include Turbolinks as an entry point. Maybe you are missing that. Why do you have |
A related issue that I solved: When requesting JS as a format and getting a redirect response, turbolinks 5 catches it and will execute a redirect. But it needs to load it's engine and this code to work. I found easiest way to fix that was to bundle turbolinks but leave out the JS require. |
@archonic Any chance that you can submit a doc PR to this file: https://github.com/shakacode/react_on_rails/blob/master/docs/additional-reading/turbolinks.md |
Will do, I'll submit something once I get it working completely. I still have to get the progress bar working. If you have any suggestions there, I'm all ears. |
FWIW, I noticed an open source project using TurboLinks with React on Rails. I posted a question there: https://github.com/coderwall/coderwall-next/issues/63 They run this code in their client registration file:
|
This can be labeled as a question. I was trying to get
turbolinks:load
event firing. I included it using npm, and can see it in webpack-bundle.js. I followed the react_on_rails readme for turbolinks. I was seeing this in the console:I thought this meant I would need a place to call
Turbolinks.start()
, but this isn't required in the tutorial app. I found the missing piece:I'm wondering why that works.
The text was updated successfully, but these errors were encountered: