[LiveComponent] Suggestion of little things that makes the difference to the doc
Nek- opened this issue · comments
Hello! I'm in the process of building my first real-world app with SymfonyUX, and I noticed some things that are not documented and a bit hard to determine by myself! Those things are simple tricks that makes the difference to me, so they need to be documented.
- Specify that
data-action="live#action"
is shorthand fordata-action="click->live#action"
! It's not obvious at all while reading the doc and it becomes a pain to understand how to hook on a click on adiv
. :prevent
https://stimulus.hotwired.dev/reference/actions#multiple-actions- Many actions for a single element? It's supported by stimulus, but maybe not by LiveComponent? I still didn't find a solution for this one! Having a line about it would make the difference! https://stimulus.hotwired.dev/reference/actions#multiple-actions
- How to use
stimulus-use
! On my side, I ended up with a custom controller that manages my usage of useClickOutside... But I'm not sure it's the good way to go (after all, the documentation mentions the debouncer without the requirement of a stimulus controller) https://stimulus-use.github.io/stimulus-use/#/use-click-outside
I hope this list will help you improve the doc! (also eventually that it may help someone in the future 😄 )
Hey @Nek- thanks to took the time to right this issue.
All of this 4 issue are stimulus specific this is why we have been light about all of that, since you can find the answer on the stimulus documentation.
But yes we need to definitly improve the doc.
The 4 - is one of the reason I start #1826. We need to show more and more concrete exemple.
For the first 3 we could improve the doc directly, let's do some PR's!