stimulus_reflex | Build reactive applications with the Rails tooling | Server Side Rendering library
kandi X-RAY | stimulus_reflex Summary
kandi X-RAY | stimulus_reflex Summary
Build reactive applications with the Rails tooling you already know and love.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of stimulus_reflex
stimulus_reflex Key Features
stimulus_reflex Examples and Code Snippets
Community Discussions
Trending Discussions on stimulus_reflex
QUESTION
bundle exec rails stimulus_reflex:install
gave me this error,
rails aborted! Don't know how to build task 'stimulus_reflex:install'
why?
(Commands in sequence...
rails new --skip-spring --webpack=stimulus chatter
yarn add redis cable_ready stimulus_reflex
bundle exec rails stimulus_reflex:install
rails aborted! Don't know how to build task 'stimulus_reflex:install'
...ANSWER
Answered 2020-Dec-05 at 17:07Stimulus Reflex has a server and a client part. With yarn you only add the client part. You need to install stimulus_reflex
by adding it to your Gemfile
or running bundle add stimulus_reflex
The docs explain how to set it up nicely: https://docs.stimulusreflex.com/setup
QUESTION
So, I'm working on a project that should have a chat component same as the linkedin chat, where the user will have all their contacts and messages.
But, I've tried of all ways to work with stimulus_reflex
and view_component
to create this chat_box
, but until now I had none progress.
So right now I'm trying to create a chat with pure action_cable, but my doubt is: Can I use this action_cable channel ('ChatRoom')
with Stimulus Reflex
? Because when we see the rails console shows something like this: Broadcasting to StimulusReflex::Channel:1
, and I want to Broadcast to the ChatRoom Channel
.
Someone was tried the same?
...ANSWER
Answered 2020-Nov-16 at 14:51stimulus_reflex
will use its own channel to update the page after a reflex. But those updates happen automatically and only for the user that triggered the reflex. Generally you don't want to touch those parts.
If you want to broadcast a message or a dom transformation after a reflex, you can do so by using cable_ready
(which comes included with stimulus_reflex
.
So something like this could work for you:
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install stimulus_reflex
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page