Skip to content

Simpler syntax for stimulus_controller()

Compare
Choose a tag to compare
@weaverryan weaverryan released this 10 Feb 22:04
· 118 commits to main since this release

Hi Webpackers!

A short time ago, v1.10.0 was released with a new stimulus_controller() Twig function. This release makes it simpler to use that with only 1 controller:

<!-- new syntax -->
{{ stimulus_controller('chart', { 'name': 'Likes', 'data': [1, 2, 3, 4] }) }}

<!-- existing, longer syntax (still works) -->
{{ stimulus_controller({ 'chart': { 'name': 'Likes', 'data': [1, 2, 3, 4] } }) }}

See #110 for more details.

Diff: v1.10.0...v1.11.0

Happy packing!