I’m still trying to understand the whole hotwire way of doing things. My application.js has these two lines:
import Rails from "@rails/ujs"
Rails.start()
Should ujs still be used? should I keep those lines?
The reason why I’m asking this is because resetting a form, like it’s shown in the video it hotwire.dev, doesn’t reset the disable state of a button which is set automatically by ujs I believe (am I right?). I’m trying to find a way to re-enable it with JavaScript, but I can’t find anything clean. I could disable the functionality with:
config.action_view.automatically_disable_submit_tag = false
and then re-implement it myself with stimulus.
I’m not sure which path is the right path here, the hotwire way.