Skip to content

Commit 0b6c5ff

Browse files
authored
Update server-data.rst
1 parent e0ba536 commit 0b6c5ff

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

frontend/encore/server-data.rst

+4-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,10 @@ them later in JavaScript. For example:
88

99
.. code-block:: html+twig
1010

11-
<div class="js-user-rating" data-is-authenticated="{{ app.user ? 'true' : 'false' }}">
11+
<div class="js-user-rating"
12+
data-is-authenticated="{{ app.user ? 'true' : 'false' }}"
13+
data-user="{{ app.user|serialize(format = 'json') }}"
14+
>
1215
<!-- ... -->
1316
</div>
1417

0 commit comments

Comments
 (0)