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.
You aren’t the first to bring that up either. There’s definitely issues surrounding this in GitHub
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
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:
this.onlineStoresStripeOutlet
and a big ugly data attribute like this on the parent controller: