Hi,
Soo I am trying to create a very small test application with yewdux-functional.
This is my root component with a simple state struct.
#[function_component(Test)]
pub fn test() -> Html {
let state = use_store::<BasicStore<TestState>>();
state.dispatch().reduce(|_| {});
html! {
{"Test123"}
}
}
#[derive(Clone, Debug, PartialEq, Default)]
pub struct TestState {}
But as soon as I include the .reduce(|_|{}) call, my browser tab starts to load forever and (I assume) busy waits one of my cores completely.
Am I not allowed to mutate the state directly in a function without callbacks etc?
This seems like a very trivial usecase to me.
Alright, dont mind this issue. I just realized, that the render call will of course be reevaluated, after reduce is executed, which will result in an infinite loop. oopsie
Hi, Soo I am trying to create a very small test application with yewdux-functional. This is my root component with a simple state struct.
But as soon as I include the
.reduce(|_|{})
call, my browser tab starts to load forever and (I assume) busy waits one of my cores completely. Am I not allowed to mutate the state directly in a function without callbacks etc? This seems like a very trivial usecase to me.