Replies: 2 comments 2 replies
-
You can gate server-only code with: #[cfg(feature = "ssr")] (or by using server functions). You can gate client-only code with: #[cfg(feature = "hydrate")] |
Beta Was this translation helpful? Give feedback.
1 reply
-
hi, I met the same problem, i tried only render at client, but got error: "element with id 0-0-0-172 not found, ignoring it for hydration". { #[cfg(target_arch = "wasm32")] {
view! {<DisplayChart/>}
}} |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'm using https://github.com/feral-dot-io/leptos-chartistry to display charts on a website i'm making in leptos, however it will only compile as wasm so it needs to run only on the client.
I have the following that works, however if i refresh a route or go directly to the route it will instead load the server and not the client code.
I have tried updating the client using an effect however it's still loading the server section of the code.
Is there anyway i can load a dependency only on the client?
Beta Was this translation helpful? Give feedback.
All reactions