Become a member
to unlock all features

Level Up!

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


    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+.

    Handle ref props with Higher Order Components


    When you wrap a component with a Higher Order Component, it becomes impossible to forward the ref prop down the component tree due to the special nature of the ref prop in React. In this lesson, we’ll see that problem in action with our Higher Order Component. We will pass the ref as an innerRef prop so that the Higher Order Component can re-assign the ref to the component that it is wrapping.