Really enjoy working with Hotwire and your gem as it speeds up development. Unfortunately, I run into troubles when interacting with components using StimulusReflex. Seems that gem breaks the connection used by StimulusReflex when hot-reload happens via TurboStream or ActionCable. Enforcing a full-page reload is my temporary fix for it.
change anything on the same page as input you created
hotwire-livereload will do its job and change the view
enter new value for input and click away
SR magic will fire
refresh the page manually, it will show old value in input field
consecutive updates of input values will result in proper behavior, but only because we did manual full reload of the page
For now, I am resolving this with enforcing automatic full reload that library allows
config.hotwire_livereload.force_reload_paths << [] but would be great if there would be a way to make it work the old way. Appreciate any suggestion, on how I could approach a described problem.
Really enjoy working with Hotwire and your gem as it speeds up development. Unfortunately, I run into troubles when interacting with components using StimulusReflex. Seems that gem breaks the connection used by StimulusReflex when hot-reload happens via TurboStream or ActionCable. Enforcing a full-page reload is my temporary fix for it.
Steps to reproduce:
gems
create a simple input field
create respective reflex
def edit_simple_field @resource = GlobalID::Locator.locate element.dataset.gid @resource.update(element.id.underscore => element.value)
morph :nothing end end
input
and click awayinput
values will result in proper behavior, but only because we did manual full reload of the pageFor now, I am resolving this with enforcing automatic full reload that library allows
config.hotwire_livereload.force_reload_paths << []
but would be great if there would be a way to make it work the old way. Appreciate any suggestion, on how I could approach a described problem.