#144 Why I am replacing Turbo Frames with Streams for ActsAsVotable?
25/08/2023
Gratis
Some server-side rendering problems can be equally solved by either Turbo Frames or Streams.
Each approach has it's cons and pros.
In this scenario I first implemented Voting with Turbo Frames.
This invoked quite a lot of extra context and calculations when calling a separate posts_controller#show action.
So I replaced Frames with Streams that required no extra context outside the current controller action, and explicitly defined the expected server-side rendered HTML (turbo stream) response.
0:00 How ActsAsVotable is set up on Superails.com
3:28 Turbo Frame refreshes vote buttons
4:50 Turbo Frames grabs new context
5:24 Turbo Streams response to replace Frames
8:37 Conclusion: choose the best tool for the job!
2
Inicia sesión para unirte a la conversación
Destacado en listas
![#59 Hotwire Turbo Streams CRUD](https://superails.com/rails/active_storage/representations/redirect/eyJfcmFpbHMiOnsiZGF0YSI6MTc4MiwicHVyIjoiYmxvYl9pZCJ9fQ==--7b4b94ff669cbcd3485cfcc3f72e9100df7eae48/eyJfcmFpbHMiOnsiZGF0YSI6eyJmb3JtYXQiOiJqcGciLCJyZXNpemVfdG9fbGltaXQiOls0MDAsNjAwXX0sInB1ciI6InZhcmlhdGlvbiJ9fQ==--2d7cd3a4d9675c7f4c17dad7856d799792bd3595/maxresdefault.jpg)
![#60 Hotwire Turbo Streams Autocomplete Search](https://superails.com/rails/active_storage/representations/redirect/eyJfcmFpbHMiOnsiZGF0YSI6MTc1MywicHVyIjoiYmxvYl9pZCJ9fQ==--c95f098cc49b4d72ecb027c13735c1bedf44cb78/eyJfcmFpbHMiOnsiZGF0YSI6eyJmb3JtYXQiOiJqcGciLCJyZXNpemVfdG9fbGltaXQiOls0MDAsNjAwXX0sInB1ciI6InZhcmlhdGlvbiJ9fQ==--2d7cd3a4d9675c7f4c17dad7856d799792bd3595/maxresdefault.jpg)
![#63 Hotwire Modals (the right way)](https://superails.com/rails/active_storage/representations/redirect/eyJfcmFpbHMiOnsiZGF0YSI6MTg2MywicHVyIjoiYmxvYl9pZCJ9fQ==--29f62b39b302aa16a6e6c28453e036aaa724add0/eyJfcmFpbHMiOnsiZGF0YSI6eyJmb3JtYXQiOiJqcGciLCJyZXNpemVfdG9fbGltaXQiOls0MDAsNjAwXX0sInB1ciI6InZhcmlhdGlvbiJ9fQ==--2d7cd3a4d9675c7f4c17dad7856d799792bd3595/maxresdefault.jpg)
+28
Just enough Hotwire for Rails developers
Recomendado según lo que estás viendo ahora
![#148 DataTables without page refresh using Hotwire Turbo Frames](https://superails.com/rails/active_storage/representations/redirect/eyJfcmFpbHMiOnsiZGF0YSI6MTk0MSwicHVyIjoiYmxvYl9pZCJ9fQ==--c55bf459bb6c4ac0c6008b9e01b3695da67cec8c/eyJfcmFpbHMiOnsiZGF0YSI6eyJmb3JtYXQiOiJqcGciLCJyZXNpemVfdG9fbGltaXQiOls0MDAsNjAwXX0sInB1ciI6InZhcmlhdGlvbiJ9fQ==--2d7cd3a4d9675c7f4c17dad7856d799792bd3595/maxresdefault.jpg)
10:59
#148 DataTables without page refresh using Hotwire Turbo Frames
01/11/2023
Gratis
2