Documentation variables could be more diverse?


I enjoy reading the documentation of Stimulus but sometimes I find it harder to understand how variables are passed when they are too similar. For example on “outlet” doc where in multiple case “result” could be different?

Same in cross controller event. Where we don’t know what we can change at first sight and what needs to be similar. Like at first reading I was thinking what “copy” represent?


I think you have a good point. I believe you will get more attention from the authors if you create an issue on GitHub. It’s valid to open issues regarding the handbook Since GitHub is also where the docs live. Let me know if you end up creating an issue, and I’ll go upvote it.

1 Like

You aren’t the first to bring that up either. There’s definitely issues surrounding this in GitHub :slight_smile:

The hardest part for me was figuring out how to use namespaced controllers with outlets. It wasn’t trivial and I ended up doing a lot of console debugging :smiley:

The key biggie is that the name of the outlets needs to match the name of the controller so I ended up with something like:

static outlets = [ 'online-stores--stripe' ]

which becomes:


and a big ugly data attribute like this on the parent controller:

1 Like

As recommended, I open an issue on Github for this subject. Documentation variables could be more diverse? · Issue #659 · hotwired/stimulus · GitHub

And a pull request for outlet API first Make inner mechanism of outlet API more obvious in documentation by benoittgt · Pull Request #663 · hotwired/stimulus · GitHub