Live data from Hacker News

Show HN: Redux with a UseState Hook

hooked-on-redux.js.org

1–10 of 24 posts

Re: Show HN: Redux with a UseState Hook

#2
Considering how verbose the current UX of Redux is, this needs to be merged into mainline React. Are there any significant performance overhead? This is a really great library, the ergonomics look amazing and the documentation is just gorgeous.

Re: Show HN: Redux with a UseState Hook

#7

Considering how verbose the current UX of Redux is, this needs to be merged into mainline React. Are there any significant performance overhead? This is a really great library, the ergonomics look amazing and the documentation is just gorgeous.

Thanks. It uses useDispatch behind the scenes which I believe has a bit more overhead compared to using connect. It should be comparable performance-wise to using the normal react-redux hooks.

Re: Show HN: Redux with a UseState Hook

#8
post #6

Looks similar to Recoil ( https://recoiljs.org/ ). How does it differ?

It's redux under the hood so with this library you'd be able to use existing redux tooling such as redux dev tools. Usually that's not possible with bespoke state management libraries (although I'm not familiar with Recoil)

Re: Show HN: Redux with a UseState Hook

#9

Considering how verbose the current UX of Redux is, this needs to be merged into mainline React. Are there any significant performance overhead? This is a really great library, the ergonomics look amazing and the documentation is just gorgeous.

Check out Redux Toolkit (https://redux-toolkit.js.org), the `slices` feature changed my view on Redux entirely. Basically you can have a per-feature slice of functionality rather than having actions, reducers, and constants spread around your code. It's analogous to what hooks did, encapsulating similar functionality.

Re: Show HN: Redux with a UseState Hook

#10
I said this in another comment, but similarly to this, check out Redux Toolkit (https://redux-toolkit.js.org), the `slices` feature changed my view on Redux entirely. Basically you can have a per-feature slice of functionality rather than having actions, reducers, and constants spread around your code. It's analogous to what hooks did, encapsulating similar functionality.
Post reply on HN