Skip to content

Commit 147216e

Browse files
committed
Additional Turbolinks updates
1 parent 919f3e9 commit 147216e

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

docs/rails/turbolinks.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ Turbolinks.start();
7878

7979
### Async script loading
8080

81-
Async script loading can be done like this:
81+
Async script loading can be done like this (starting with Shakapacker 8.2):
8282

8383
```erb
8484
<%= javascript_include_tag 'application', async: Rails.env.production? %>
@@ -102,6 +102,9 @@ document.addEventListener('turbolinks:load', function () {
102102

103103
React on Rails 15 fixes both issues, so if you still have the listener it can be removed (and should be as `reactOnRailsPageLoaded()` is now async).
104104

105+
> [!WARNING]
106+
> Do not use `force_load: false` with Turbolinks if you have async scripts.
107+
105108
## Troubleshooting
106109

107110
To turn on tracing of Turbolinks events, put this in your registration file, where you register your components.

0 commit comments

Comments
 (0)