symfony-docs
symfony-docs copied to clipboard
[Frontend] Add documentation about Stimulus and the Symfony UX Helper
Currently, the only documentation available about the Twig functions for Stimulus is located inside the README of the WebpackEncoreBundle.
This does not make it easy to find documentation about Stimulus integration in Twig, especially if the first place to search is the Symfony documentation.
I propose to extract this documentation into a dedicated page under frontend.
WDYT ?
Thank you for this issue. There has not been a lot of activity here for a while. Has this been resolved?
Friendly ping? Should this still be open? I will close if I don't hear anything.
Meanwhile, there is at least some documentation on https://symfony.com/doc/current/frontend/encore/simple-example.html#stimulus-symfony-ux
However, what I don't quite get (i.e. should be explained): What's the advantage of all those helpers in StimulusTwigExtension at all?
Native Stimulus:
<button data-action="say-hello#greet">Greet</button>
Helper:
<button {{ stimulus_action('say-hello', 'greet') }}>Greet</button>
Since the outcome is the same, I don't see the benefit...
Closing as fixed because we now mention Stimulus in the docs, list the different components and provides links to resources at https://ux.symfony.com Thanks!