Skip to content

Blogging On Rails

Everything on Rails!

Convert your jQuery snippet to a Stimulus controller

Getting started with Stimulus can be as easy as converting a small jQuery snippet into a Stimulus controller. Here are three conventions that will make the conversion really quick. This assumes you’ve setup Stimulus already. ’turbolinks:load’ to connect() Any setup that the jQuery snippet does when the page is loaded can be moved to theContinue reading “Convert your jQuery snippet to a Stimulus controller”

Copyright © 2024 John Beatty. All rights reserved.