Hans Lemuet


1,620 Experience
16 Lessons Completed
0 Questions Solved


Posted in Dynamic Nested Forms with Stimulus JS Discussion

That's a great one!

I'd suggest using <button type="button"> elements instead of links. This way you don't have to use event.preventDefault() because by default a button doesn't do anything.

Also, for both links and buttons, the default Stimulus action is click so the click-> part in the data-action is optional.

Posted in Using webpacker in Rails Engines?

Hi Johan! Have you seen this issue? https://github.com/rails/webpacker/issues/348
logo Created with Sketch.

Ruby on Rails tutorials, guides, and screencasts for web developers learning Ruby, Rails, Javascript, Turbolinks, Stimulus.js, Vue.js, and more. Icons by Icons8

© 2021 GoRails, LLC. All rights reserved.