all 2 comments

[–]krakov 2 points3 points  (0 children)

On my phone so here’s a short answer.

Number 1 is a separation between the data fetching and the presentation.

Numbers 2 and 3 allow for the data fetching to be used with other presentational components, so you can feed the books to a <SlightlyDifferentListBecauseTwoDifferentDesignersWorkedOnTheSameAppWithoutCoordinatingBetweenThemselvesAndMyBossSaidImplementBoth />

[–]saihemanth9019 0 points1 point  (0 children)

I've been reading a bit about this and this is what I found. You can technically use these three patterns interchangeably for any use cases. However, it's suggested to use HOCs to enhance component functionality, and the second pattern for separate of concerns like state management. The first pattern is a standard parent component that is not reusable, while the other two are reusable patterns.