Open murtyjones opened 5 years ago
Yeah you're running into this:
Which was recently discovered by @austinsheep
I haven't yet thought about what changes in state management approach could fix this problem - so for now you might just use the same requestAnimationFrame strategy.
Open to any ideas you have of course!
I'll leave this issue open as this is definitely a problem that should be resolved!
More context
Basically on_visit
gets called while Store
is mutably borrowed so you can't just borrow it again.
Should've read the comments. Makes sense! Thank you
If you don't mind - going to keep this open until we land on a better way to handle this scenario which, like you said, other people will surely run into.
Thanks!
Hi!
I'd like to trigger a change to state (in this case, to hide an element) when a page is visited. To do so I put a
.msg()
in anon_visit
handler, like so:Expected behavior
Page loads and the element I've specified is hidden as a result of the above message being sent
Actual behavior
This runtime error:
Minimal Reproducible Example
In the
isomorphic example
, you can reproduce by changingdownload_contributers_json
to send a message like so:Notes
From reading a little bit about the error is that it's more of an
Rc/RefCell
problem than apercy
problem. I thought would be useful to post it here anyways because I imagine others will get snagged on it at some point.