-
-
Notifications
You must be signed in to change notification settings - Fork 382
Closed
Labels
BugBug FixBug Fix
Description
Hey Symfony team! Thanks for all the amazing work you did so far! 🙏🏻
"symfony/ux-react": "^2.2"
I've noticed an issue when I tried to render react component without props using the react_component
twig function.
When I try to render react component like this:
<div {{ react_component('MyComponent') }}></div>
I get the following console error:
As you can see from the image, it renders props as an array instead an object
It works this way (without props data attribute)
<div data-controller="symfony--ux-react--react" data-symfony--ux-react--react-component-value="MyComponent"></div>
I think that props should be optional.
Thanks!
ecilion and deluxetom
Metadata
Metadata
Assignees
Labels
BugBug FixBug Fix