intendednull / yewdux

Ergonomic state management for Yew applications
https://intendednull.github.io/yewdux/
Apache License 2.0
319 stars 31 forks source link

I have a problem with the ReducerStore and BasicStore #16

Closed tykim83 closed 2 years ago

tykim83 commented 2 years ago

I dont know if I can ask some help here, but I have been stuck for a while now. https://github.com/tykim83/text_adventure_v4_yewdux

I have this project which has two components and a shared state with actions. If I use ReducerStore for both components after 2 Action one of the 2 component does't get updated and the prgram crashes. But If I use BasicStore for the main component the main component doesn't get updated but the the logic on state and the other component works.

Could anyone have a look and give me some advice? Thank you

intendednull commented 2 years ago

@tykim83 mind sharing the traceback you're getting when it crashes?

State is only shared when components use the exact same store type, so a component using a BasicStore<MyState> will not share state with a component using ReducerStore<MyState>.

intendednull commented 2 years ago

Closing this for inactivity. Feel free to join the discord for any additional support https://discord.gg/VQck8X4