Save 36% for Black Friday! Learn more

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?
logo Created with Sketch.

Screencast tutorials to help you learn Ruby on Rails, Javascript, Hotwire, Turbo, Stimulus.js, PostgreSQL, MySQL, Ubuntu, and more. Icons by Icons8

© 2022 GoRails, LLC. All rights reserved.