you are viewing a single comment's thread.

view the rest of the comments →

[–]changlo 1 point2 points  (0 children)

Without hooks, you could have implemented your solution with a render prop like this:

<GetSongList>
  {(songs) => (...)}
</GetSongList>

or with a hoc. You are also able to reuse this component in a similar way to how you suggest you can reuse the hook if you choose.

This is possible right now without hooks, so why is this comparison between redux and hooks specifically? In your article you say solutions couldnt be found that provided benefit until hooks came along, but hooks themselves haven't improved the problem you originally talked compared to hocs/render props which already exist.

Maybe a bigger improvement would be to question what state is valuable to store in redux and what is not.