Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

This project aims to demonstrate the difference between turbo_frame and turbo_stream. It also has a example of turbo_stream_from that allow update content via websockets to all clients at the same time.

Notifications You must be signed in to change notification settings

lucasgeron/rails-turbo-frame-vs-turbo-stream

Repository files navigation

Rails Turbo Frame vs Turbo Stream

rails Turbo Frame vs Turbo Stream

This is my implementation of the article from mixandgo.com

This application is a simple index with four buttons.

  • Default link_to button
  • link_to turbo_frame
  • link_to turbo_stream
  • link_to turbo_stream via Websocket

The objetive is to show the difference between how turbo works with turbo_frame and turbo_stream.

The last button is a link_to that sends a message to the server via Websocket. The server will broadcast a turbo_stream to all clients.

Installation

  • Clone this repository
  • Install dependencies with bundle install
  • Run the migrations with rails db:migrate
  • Run the server with ./bin/dev
  • Visit http://localhost:3000
  • Ready to Use

Feel free to customize this application.

Tutorial Step by Step

Check the tutorial step by step in

About

This project aims to demonstrate the difference between turbo_frame and turbo_stream. It also has a example of turbo_stream_from that allow update content via websockets to all clients at the same time.

Resources

Stars

Watchers

Forks