From 09a8f7c04027228e73a93271391b2dd8991e5c07 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9my=20Marronnier?= Date: Sat, 15 Jan 2022 17:55:01 +0100 Subject: [PATCH] Adding @hotwired/turbo --- src/browser_app_skeleton/package.json | 2 +- src/browser_app_skeleton/src/js/app.js | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/browser_app_skeleton/package.json b/src/browser_app_skeleton/package.json index 7939ee18..34512d18 100644 --- a/src/browser_app_skeleton/package.json +++ b/src/browser_app_skeleton/package.json @@ -4,7 +4,7 @@ "dependencies": { "@rails/ujs": "^6.0.0", "modern-normalize": "^1.1.0", - "turbolinks": "^5.2.0" + "@hotwired/turbo": "^7.1.0" }, "scripts": { "heroku-postbuild": "yarn prod", diff --git a/src/browser_app_skeleton/src/js/app.js b/src/browser_app_skeleton/src/js/app.js index d5bb8dc2..948444de 100644 --- a/src/browser_app_skeleton/src/js/app.js +++ b/src/browser_app_skeleton/src/js/app.js @@ -4,11 +4,11 @@ // Though it says "Rails" it actually works with any framework. require("@rails/ujs").start(); -// Turbolinks is optional. Learn more: https://github.com/turbolinks/turbolinks/ -require("turbolinks").start(); +// Turbo is optional. Learn more: https://github.com/hotwired/turbo +require("@hotwired/turbo"); -// If using Turbolinks, you can attach events to page load like this: +// If using Turbo, you can attach events to page load like this: // -// document.addEventListener("turbolinks:load", function() { +// document.addEventListener("turbo:load", function() { // ... // })