Okay, uh *rubbing eyes* Rust question I'm looking at the library yew_hooks I cop...
mcc @mcc@mastodon.social
Okay, uh *rubbing eyes* Rust question
I'm looking at the library yew_hooks
I copypaste this sample code.
https://docs.rs/yew-hooks/0.6.4/yew_hooks/fn.use_effect_once.html
on my call
yew_hooks::use_effect_once(|| { // Connect
...
});
I get the error
expected an `FnOnce()` closure, found `()`
…huh?
If I change my call to
yew_hooks::use_effect_once(|| { // Connect
...
|| {}
});
It works.
???
Furthermore, there's a (EffectOnce) tag on the component macro, whose presence or absence seems to change nothing.
[Post 1 of 2]