Best practice for working with modifiable server-side data? Do we need serializable signals? #2061
PeterDraex
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I have a common use case: Load data from the API, enable editing on the client.
The straightforward solution I used:
createSignal
for each modifiable property of the dataWhen I try to server side render the page:
renderToString
it works okayrenderToStringAsync
it breaks down, because it tries to serialize the accessors/setters for the signalsWhat's the proper solution here? Is it to delay creating signals until
onMount
? It feels like a workaround and it slows down the page. Is there any better solution? I appreciate any guidance!Beta Was this translation helpful? Give feedback.
All reactions