Hans Lemuet

Joined

1,720 Experience
17 Lessons Completed
0 Questions Solved

Activity

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

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

© 2024 GoRails, LLC. All rights reserved.