Hacker News new | ask | show | jobs
by marc 1089 days ago
Great write-up!

I appreciate that you went the extra mile by showing how a generic enough controller can be used for various use cases.

People coming a from traditional JS background tend to make very specific Stimulus controllers, but when you make them a bit more abstract and modular they become more usable and easier to maintain.

1 comments

Thank you! I agree - I've seen other articles creating very specific controllers, which gets you into the issue of having heaps of specific controllers which could just be 1.

Glad you found the article useful!