TIL: Turbo Stream and personalised content — Good Enough

18-Aug-2023 842
Hotwire and Turbo are great for very quickly and easily adding real-time updating of webpages without requiring the browser to reload the whole page.But if the information you want to stream back from your server to the client has anything specific to the current user — like using the name "You" instead of "James" — you might hit an issue. So far I haven't found this written up on the web anywhere, so hopefully this will help someone else with the same problem.Let's take this example straight from the documentation:.
Use coupon code:

RUBYONRAILS

to get 30% discount on our bundle!
Prepare for your next tech interview with our comprehensive collection of programming interview guides. Covering JavaScript, Ruby on Rails, React, and Python, these highly-rated books offer thousands of essential questions and answers to boost your interview success. Buy our 'Ultimate Job Interview Preparation eBook Bundle' featuring 2200+ questions across multiple languages. Ultimate Job Interview Preparation eBook Bundle