Foreman uses a very old version of turbolinks (turbolinks-classic) which is not maintained and won’t be supported anymore.
Turbolinks mimics a SPA behavior by body-swapping when the head element remain the same ( by observing tracked scripts and other tags on it). Turblinks adds events and listeners in order to fulfill a SPA look like
1, Upgrading Turbolinks
2, Switching to an alternative solution
3. Dropping Turbolinks with no alternative
Do we really need turbolinks?
React and especially react-router don’t work well with Turbolinks, mostly because both alter the browser’s
history object, and both addressing the same set of problems but in a way different approach, we had and still have workarounds and hacks in order to make them somehow to work together.
In addition, turbolinks adds lots of events that we barely use due to moving to react, and works behind the scene, like a black box, although we do have a brand new client-routing mechanism and I prefer a small implementation to control legacy transitions together with our routing mechanism in one place - it would be more stable for the long term; maintainable and fully testable,
I’ve created a small POC that mimics the body-swapping mechanism of turbolinks but controlled by our client routing mechanism.