You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
let eval = eval(r#"
/*... initialize things here */
while (true) {
let msg = await dioxus.recv();
}
"#);
but it is rerun every time my component is updated. And my initialized vars are reset.
Is there an equivalent to a eval_once that would only occur after the component is first created and never rerun afterwards?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hi,
I currently use an eval in my code
but it is rerun every time my component is updated. And my initialized vars are reset.
Is there an equivalent to a eval_once that would only occur after the component is first created and never rerun afterwards?
Thanks
Beta Was this translation helpful? Give feedback.
All reactions