KazooHR / engineering-lunchnlearn

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

HoC vs. Render Props components in React #11

Open stripethree opened 5 years ago

stripethree commented 5 years ago

Issue by nearbycoder Thursday Sep 20, 2018 at 17:13 GMT Originally opened as https://github.com/youearnedit/YEI-lunchnlearn/issues/6


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.