DEV Community

Discussion on: Composable Stimulus Controllers?

Collapse
 
skatkov profile image
Stanislav(Stas) Katkov

Hey Adrien, thanks for sharing your thoughts on this.

Based on reference documentation for stimulus, it's possible to use multiple controllers on a single DOM element. Doesn't that qualify as composable?

stimulusjs.org/reference/controllers

Collapse
 
adrienpoly profile image
Adrien Poly

Yes it is definitely a great way to compose controllers. It forces you to make small and specialized controllers. This is a good practice however not always followed in practice 😀