Skip to content

[LiveComponent] Suggestion of little things that makes the difference to the doc #1849

Open
@Nek-

Description

@Nek-

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.

  1. Specify that data-action="live#action" is shorthand for data-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 a div.
  2. :prevent https://stimulus.hotwired.dev/reference/actions#multiple-actions
  3. 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
  4. 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 😄 )

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions