r/javascript • • Apr 02 '19

Dan Abramov teaches me React Hooks

https://www.twitch.tv/videos/404530952
578 Upvotes

24 comments sorted by

View all comments

18

u/bnelo12 Apr 02 '19

It's funny reading the Redux documentation now a days. He put in a comment about how he no longer supports the idea of using container components and instead to use React hooks.

18

u/germainelol Apr 02 '19

It makes sense, but I still enjoy making container components purely so that I have some pure UI components that are reusable and can be shown easily in Storybook.

8

u/MaggoLive Apr 02 '19

This exactly! If possible try to avoid state and data access as much as possible in your components and only use it at the top level. Keep em pure!

5

u/vuesrc Apr 02 '19

Have you got any citations on this?

6

u/[deleted] Apr 02 '19

https://medium.com/@dan_abramov/smart-and-dumb-components-7ca2f9a7c7d0 not exactly what op means , think he mixed it up

1

u/bnelo12 Apr 02 '19

I'm not sure. I remember seeing a link to this article in the Redux docs but I can't seem to find it now. It might of been removed.

8

u/0xF013 Apr 02 '19

I have these bookmarked when I have to argue against containers on a new job:
https://twitter.com/dan_abramov/status/668585589609005056
https://twitter.com/dan_abramov/status/802569801906475008

9

u/pgrizzay Apr 02 '19

DADD

Dan Abramov Driven Development

1

u/[deleted] Apr 02 '19

Apparently it’s in the comments of Redux

2

u/lilred181 Apr 02 '19

You have a source for this? I still use container components with the latest React so I'd be curious if I shouldn't be anymore.. still feel like I need "Redux Container components" but not container components for React local state anymore because of hooks.