-
Notifications
You must be signed in to change notification settings - Fork 54
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
Recover component state from DOM #234
Labels
enhancement
New feature or request
Comments
The example usage in this issue - the template is static and we only want to add js code in |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This is a feature request.
For example, I have a link component:
To hydrate it, we have to stringify
url
andtext
property:Which produces code like this:
However, these props are already available in DOM, result in data duplication.
Proposal
Support "server-only props" via the original syntax:
link
andtext
will still be rendered in the server.Support a
recover
module function in the component:When hydrating:
I don't know whether this is already supported by svelte. Is svelte component able to recover its state from pre-rendered DOM?
The text was updated successfully, but these errors were encountered: