Exploring the Power of Turbo Streams and ActionCable
July 14, 2023
38 min
Free
ruby
ruby-on-rails
actioncable
turbo-streams
real-time
dom-manipulation
tic-tac-toe
hotwire
web-sockets
javascript
html
api
Description
This talk explores the power of Turbo Streams and ActionCable by building a real-time tic-tac-toe game. It covers the fundamentals of WebSockets, how ActionCable provides a Rails-native abstraction for them, and how Turbo Streams further simplifies real-time DOM updates by sending HTML over the wire. The presentation walks through constructing a game with features like player joining, move notifications, restricting the number of players, and handling player disconnections.