Skip to content

Blogging On Rails

Everything on Rails!

Where do I store my state in Stimulus.js?

Stimulus.js allows for a myriad of ways to store state about our webapp. One thing to always keep in mind is that Stimulus.js wants to enhance existing HTML instead of control all of the page’s DOM, so we will need to think of ways that leverage server generated HTML to manage our state and progressivelyContinue reading “Where do I store my state in Stimulus.js?”

Stimulus.js Tutorial – Multiple Selects that Filter Enterprise Data Models

If you have a lot of records that fall into many different buckets, it can be hard to filter all of that complex data record. Thankfully, we can string together a couple select fields to filter based on multiple, disparate categories. This might be like something you’d see on a car shopping website, where youContinue reading “Stimulus.js Tutorial – Multiple Selects that Filter Enterprise Data Models”

Stimulus.js Tutorial – Using multi select to pare down a large set of data

Now that we have a lot of books in our library system, it would be great if we could quickly filter the books based on their category. HTML supplies a nifty builtin tag, called multi select, that will let us display a couple options. Our librarians can then select one category, or a couple ofContinue reading “Stimulus.js Tutorial – Using multi select to pare down a large set of data”

Copyright © 2024 John Beatty. All rights reserved.