Stimulus Reflex

forked from Stimulus Reflex

We extend the capabilities of both Rails and Stimulus by intercepting user interactions and passing them to Rails over real-time websockets. These interactions are processed by Reflex actions that change application state. The current page is quickly re-rendered and the changes are sent to the client using CableReady. The page is then morphed to reflect the new application state. This entire round-trip allows us to update the UI in 20-30ms without flicker or expensive page loads.
websocket stimulus 1,095 0


Dave Kimura
Dave Kimura

May 17, 2020

Copy and paste this code into your terminal

DISCLAIMER: You should always review templates before running them. By running the template, you are agreeing to the terms of use.

The contents of this script as show. Any updates will be reflected in the below code and the snippet.

def puts_red(heredoc)
  puts set_color heredoc, :red
end

if !defined?(Webpacker)
  puts_red 'Webpacker was not installed. Adding it now...'
  gem 'webpacker'
  rails_command 'webpacker:install'
end

gem 'stimulus_reflex'
run 'bundle install'
rails_command 'stimulus_reflex:install'

A place where you can thank the author, post problems, give constructive feedback, etc. Be nice!