Skip to content

Commit a4db9bb

Browse files
committed
minor #1568 [Doc] Minor fix in a Live Component code example (javiereguiluz)
This PR was merged into the 2.x branch. Discussion ---------- [Doc] Minor fix in a Live Component code example | Q | A | ------------- | --- | Bug fix? | no | New feature? | no | Issues | - | License | MIT Commits ------- c59e52e [Doc] Minro fix in a Live Component code example
2 parents 54c91a8 + c59e52e commit a4db9bb

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/LiveComponent/doc/index.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -833,7 +833,7 @@ of the change:
833833

834834
.. code-block:: javascript
835835
836-
const rootElement = document.getElementById('favorite-food');
836+
const input = document.getElementById('favorite-food');
837837
input.value = 'sushi';
838838
839839
input.dispatchEvent(new Event('change', { bubbles: true }));
@@ -1007,7 +1007,7 @@ Live components require a single "default action" that is used to
10071007
re-render it. By default, this is an empty ``__invoke()`` method and can
10081008
be added with the ``DefaultActionTrait``. Live components are actually
10091009
Symfony controllers so you can add the normal controller
1010-
attributes/annotations (ie ``#[Cache]``/``#[Security]``) to either the
1010+
attributes/annotations (i.e. ``#[Cache]``/``#[Security]``) to either the
10111011
entire class just a single action.
10121012

10131013
You can also trigger custom actions on your component. Let's pretend we

0 commit comments

Comments
 (0)