-
I want to make a Monaco component with the rust-monaco crate. For this, the component needs to be rendered on the client as the server, of course, cannot use the bindings. Is there a way I can tell Leptos to not SSR a single component or force it to re-render it on the client? I could also be on the wrong track about how this needs to work, so if anyone has already made monaco component for Leptos, I'd appreciate the help. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
Hm this is interesting. It's definitely somewhere on the agenda to have something like a For now, the closest you can get is probably let (outlet, set_outlet) = create_signal(cx, None::<View>);
// `create_effect` only runs on the client, and will run once immediately
create_effect(cx, move |_| {
// delays a tick until after hydration is done so there's no mismatch
request_animation_frame(move || {
set_outlet(/* whatever the new view is */)
})
}) This could be wrapped in a component, of course. In fact, that's probably pretty darn close to what a |
Beta Was this translation helpful? Give feedback.
rust-monaco
docs, is that they implementDrop
…