While this was primarily a bug-fix release, there were some exciting leaps forward, especially on the CableReady side. You should check out the new graft operation, which seems dry until you realize that you can move elements on your DOM without losing the internal state of your Stimulus controllers.
- life-cycle callbacks now return the correct element reference
- fixed an issue with form data serialization for characters like
- addressed issue with
morphdomwhich interfered with input/select elements losing their value
For those of you who were tired of getting endless warnings about missing controllers when deleting elements via a Reflex, we're thrilled with the way Reflex controller responsibility is now managed.
- speaking of CableReady, the new v4.4 means operation and broadcast method chaining as well as customizable should/did morph callbacks
- major improvements behind the scenes to better handle (many) concurrent Reflex actions
renderis now automatically delegated to the current page's controller
- opt-in Rack middleware support for Page Morphs
More than anything, StimulusReflex v3.4 feels fast and incredibly solid. We didn't take any shortcuts when it came to killing bugs and doing things right. We owe that to our users as we use our surplus to build the world we want to live in, together. 🌲
- make sure that you update
stimulus_reflexin both your Gemfile and package.json
- it's very important to remove any
include CableReady::Broadcasterstatements from your Reflex classes
- OPTIONAL: generate an initializer with
rails g stimulus_reflex:config
bundle remove cable_ready && yarn remove cable_ready
Introduces the concept of Morphs to StimulusReflex.
Nothing Morphs provide a lightning-fast RPC mechanism to launch ActiveJobs, initiate CableReady broadcasts, call APIs and emit signals to external processes.