I want to know how the author's website uses Turbo.js #154
Replies: 1 comment
-
Hello again! I flicked at this a little bit in the release notes where I mentioned I was now using Turbo.js for underscoretw.com:
There are definitely some hiccups that come along with using Turbo.js! My argument is basically that if you want a website that performs like a headless site, using Turbo.js is less work than going fully headless. But it's definitely more work than not doing either of those two things. You need to think about every JavaScript asset your website uses and make sure that it works with Turbo's lifecycle events. This can easily become non-trivial, and it's not something I've tried with WooCommerce to date. On a site like the one for _tw (and on some client sites I've launched), I've been able to make it work throughout those sites. But with the amount of third-party JavaScript you get with WooCommerce, I think it could be a challenge. If I were trying to go that route, I would likely recreate many of the interactions using Alpine.js rather than try to get the built-in ones to work, and I don't think that approach would make sense for the majority of WooCommerce stores. (But if you were thinking about creating a headless WooCommerce store, I would argue that using Turbo.js might be less work.) |
Beta Was this translation helpful? Give feedback.
-
I'm using the following way
It works very well. I didn't write any other lines of code and it works. However, there are many problems on the
woocommerce
page. For example, after adding to card, there is no pop-up message of successfully adding to the shopping cart. When clickingCart
, the page always displays empty. I needF5
to display the contents of the shopping cart normally. If I click theCart
link again, it will become empty. I believe there will be problems on otherwoocommerce
pages as well.I believe it has something to do with
Turbo.js
usage or settings, I fell in love with this_tw
, as long as I solve some difficulties, this is one of them, thank you allBeta Was this translation helpful? Give feedback.
All reactions