I have a list of links which is styled differently depending on their “read” status. Unread items are in bold for example. Clicking a link renders the item and marks it as read, so on subsequent requests to the list page the item renders correctly. However, clicking the back button from the item page shows a cached copy of the list page, where the item is still shown as unread.
I’m currently working around this using a stimulus controller which removes the unread class on click, but I was wondering if there was another way to accomplish this using just turbo? Can I force turbo to reload the affected item when the page is restored using the back button?
But I may be atypical on these forums in that I use very few Turbo frames and use Stimulus quite extensively for small user interactions.
Disabling the Turbo previews is also a possibility btw. I ended up doing that and I’m using page transitions instead. It all depends what you want to do, I don’t think there’s an established best practice that covers every use case.