youearnedit / YEI-lunchnlearn

A place for tracking things we talk about, or want to talk about, at Lunch 'n' Learn.
2 stars 0 forks source link

HoC vs. Render Props components in React #6

Open nearbycoder opened 5 years ago

nearbycoder commented 5 years ago

So one of the big questions in React is how to compose your components. Do you go with using a Higher Order Component wrapper or could you just have a RenderProps component pass the data down? One great talk that answers this questions all be it a bit over 30 minutes but could be cut down for time is.

Michael Jackson - Never Write Another HoC https://www.youtube.com/watch?v=BcVAq3YFiuc

Michael Jackson is one of the original maintainers and still maintains it today of React Router and provides a lot of context with how state is passed down.