Comment

Comment by user43928

Redux is great and it solves exactly that problem.

You create a selector. You use the selector in a React component.

The component re-renders when the selector outputs a different value, with the usual reference equality caveat.

Does it get any simpler than that?

However, yes, I have seen most developers use Redux incompetently.

They would use actions like "setOrder" instead of "itemAdded", defeating the purpose of a state machine from the start.

parent user43928 2 months ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton