Skip to content

[LiveComponent] Improve misleading smart render algorithm docs #2741

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 23, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/LiveComponent/doc/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3447,14 +3447,14 @@

The ``#[PostHydrate]`` hook is called immediately after the component's state
is loaded from the client. This is useful if you need to process or adjust
the data once it’s been hydrated.

Check failure on line 3450 in src/LiveComponent/doc/index.rst

View workflow job for this annotation

GitHub Actions / DOCtor-RST

Please use straight single quotes (' ... ') instead of curly quotes (‘ ... ’)

``PreDehydrate`` Hook
~~~~~~~~~~~~~~~~~~~~~

The ``#[PreDehydrate]`` hook is triggered just before your component’s state

Check failure on line 3455 in src/LiveComponent/doc/index.rst

View workflow job for this annotation

GitHub Actions / DOCtor-RST

Please use straight single quotes (' ... ') instead of curly quotes (‘ ... ’)
is sent back to the client. You can use this to modify or clean up the data
before it’s serialized and returned to the client.

Check failure on line 3457 in src/LiveComponent/doc/index.rst

View workflow job for this annotation

GitHub Actions / DOCtor-RST

Please use straight single quotes (' ... ') instead of curly quotes (‘ ... ’)

``PreReRender`` Hook
~~~~~~~~~~~~~~~~~~~~
Expand Down Expand Up @@ -3507,7 +3507,7 @@

The system doesn't handle every edge case, so here are some things to keep in mind:

* If JavaScript changes an attribute on an element, that change is **preserved**.
* If JavaScript changes an attribute on a child element, that change is **preserved**.
* If JavaScript adds a new element, that element is **preserved**.
* If JavaScript removes an element that was originally rendered by the component,
that change will be **lost**: the element will be re-added during the next re-render.
Expand Down
Loading