[0.7] Ways of creating a non-Send Resource #3312
-
|
Hey all! I'm trying to upgrade my Leptos project from 0.6 -> 0.7, and one thing I'm stuck on is that the Resource |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
|
The answer here depends slightly on which kind of platform you're using. If you're using CSR, then the serialization/server-client part of Resource isn't necessary and you can use LocalResource, which doesn't have a If you're using SSR + hydration, then the problem is specifically that The added |
Beta Was this translation helpful? Give feedback.
The answer here depends slightly on which kind of platform you're using.
If you're using CSR, then the serialization/server-client part of Resource isn't necessary and you can use LocalResource, which doesn't have a
Sendbound.If you're using SSR + hydration, then the problem is specifically that
reqwestuses types that areSendon the server (and show up in docs asSend, which is confusing!) but are!Sendin the WASM build. You might try taking a look at how I set this up in thehackernewsexample: essentially usingSendWrapperon the client.The added
Sendbound here is an unfortunate trade-off of allowing the reactive system and server rendering to support multithreading.