@@ -830,9 +830,11 @@ The ``with`` data is what's mounted on the component object.
830
830
{% endblock %}
831
831
{% endcomponent %}
832
832
833
- .. note ::
833
+ .. versionadded :: 2.11
834
834
835
- The ``{% component %} `` syntax *cannot * currently be used with LiveComponents.
835
+ The ``{% component %} `` syntax can also be used with LiveComponents since 2.11.
836
+ However, there are some caveats related to the context between parent and child
837
+ components during re-rending. Read `Passing Blocks to Live Components `_.
836
838
837
839
Inheritance & Forwarding "Outer Blocks"
838
840
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -1004,8 +1006,10 @@ This requires Twig 3.7.0 or higher:
1004
1006
1005
1007
<twig:Alert{{ ...myAttributes }} />
1006
1008
1007
- Passing Blocks to your Component
1008
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1009
+ .. _passing-blocks :
1010
+
1011
+ Passing Content (Blocks) to Components
1012
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1009
1013
1010
1014
You can also pass content directly to your component:
1011
1015
@@ -1121,5 +1125,6 @@ https://symfony.com/doc/current/contributing/code/bc.html
1121
1125
.. _`live component` : https://symfony.com/bundles/ux-live-component/current/index.html
1122
1126
.. _`Vue` : https://v3.vuejs.org/guide/computed.html
1123
1127
.. _`Live Nested Components` : https://symfony.com/bundles/ux-live-component/current/index.html#nested-components
1128
+ .. _`Passing Blocks to Live Components` : https://symfony.com/bundles/ux-live-component/current/index.html#passing-blocks
1124
1129
.. _`embed tag` : https://twig.symfony.com/doc/3.x/tags/embed.html
1125
1130
.. _`Stimulus controller` : https://symfony.com/bundles/StimulusBundle/current/index.html
0 commit comments