Hacker News new | past | comments | ask | show | jobs | submit login

For me, how vuex works was very very easy to visualize. State, mutations and actions are very intuitive.

On the other hand, redux's reducers are harder to visualize at the beginning. Until you learn how the reducer works, every reference to "reducer" leaves you slightly confused.

I visualized redux's better with a simple example. It helps you to see how state and reducers interact.




Long before learning of React or redux I built a similar system to do IPC between two embedded MCUs.

All state was owned by the master MCU, slave MCU sent messages to the master requesting changes of state, the entire state for the slave CPU was then sent over with the requested changes.

Even what UI screen was shown was handled this way.

I was much more junior then, so the entire system wasn't event driven, all state was transferred every 33ms (iirc).

Redux is moderately more complex than that system, although my system was built in pure C and involved interop between C and C# running in an interpreter.




Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | Legal | Apply to YC | Contact

Search: