1×
Become a member
to unlock all features

Level Up!

Access all courses & lessons on egghead today and lock-in your price for life.

Autoplay

    Advanced React Component Patterns Update

    This lesson was part of the Advanced React Component Patterns course, which has been updated to reflect the new patterns and API available in React 16.3+.

    Use Render Props with React

    reactReact

    In this lesson, we'll take a step back and reexamine the problem by doing a few tiny refactorings to arrive at a new pattern called render props. render props is just a function that you pass to a component that renders jsx. This pattern gives us the ability to use Reacts lifecycle methods where as with Higher Order Components, you could not. We'll see that it allows us to avoid using APIs like context and all of the issues we had to deal with when using Higher Order Components.