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

> Recent versions of Redux include a useSelector hook that manages that context provider for you, which is probably where some of the confusion comes from.

There's no confusion, Redux absolutely does deal with passing around data in your app, that's why there's literally an FAQ dedicated to how to do it[1][2] -- and whether or not it should be done via setState or the Redux store. It's a stupid solution to a stupid problem, but now we're stuck here until TikTok will inevitably come up with their own "ground-breaking" React replacement in 5 or so years and we'll start the whole cycle again.

[1] https://redux.js.org/faq/organizing-state#how-do-i-organize-...

[2] https://stackoverflow.com/questions/37264415/how-to-optimize...




Nothing on that page is about passing data around. It's about whether or not you should manage state locally in the component, or globally in the state manager. In cases where you choose to hold the data in the global state manager you access the state manager (in React) via a context provider. That context provider is not a part of Redux - it's react-redux as isakkeyten noted.

I understand that this probably feels incredibly pedantic but it's quite important to frontend engineers like me. Redux is only a state manager, and it is not a React library.


I think your idea of “passing data around” is pretty far off from the commonly accepted one.


Hate to be that guy but redux is not a react library, you are talking about the react-redux library which are bindings for react to redux.

So you don't hate redux, you hate how react binds to it.


well I sort of love to be the guy that asks if there is some other library that binds to redux that I will love, and thus also cause me to feel some sleight love by association for redux?


after edit window - must be tired I wrote sleight instead of slight.




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

Search: