-
-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
SSR with methods #167
Comments
Yes! #169. Thanks for raising |
Cool, thanks for quick response! Looking into PR, I'm curious - does or will svelte support picking up after SSR and make DOM interactive automagically? |
Not yet, no. Svelte currently appends to the target element, so you need to do this sort of thing... var target = document.querySelector( 'main' );
target.innerHTML = '';
var thing = new Thing({ target }); ...which is less than ideal. Hydration is the other half of #1 (see also #148 (comment)), after SSR – we haven't quite figured out the best approach yet. |
I see, thank you! |
This is fixed in 1.2.2 |
I have a simple counter method
and unless I remove
on:click="increment()"
SSR will return:Should this work?
The text was updated successfully, but these errors were encountered: