ux
ux copied to clipboard
[TwigComponent] support passing data to `component()` variadically
This would remove an array level from the component function:
{{ component('my_component', { prop1: 1, prop2: 2 }) }}
{# could be shortened to: #}
{{ component('my_component', prop1: 1, prop2: 2) }}
Can this be done in a BC way?
I discovered this currently can't work as twig snake-cases variadic properties. For {{ component('my_component', prop1: 1, prop2: 2) }}, prop1 and prop2 are received as prop_1 and prop_2.
Thank you for this issue. There has not been a lot of activity here for a while. Has this been resolved?