Sometimes you have some boilerplate for components that would be nice to abstract away slightly with a simple helper function. In this lesson we'll learn how to create a "Higher Order Component" which is a component factory function. We'll use it to give a given component a prop for our context value.
Anyone has tried this with Typescript? It's quite hard to define/type the props and the result component :/
Tomeu, this is actually one of the reasons that higher order components have fallen out of favor in the community. Generally prefer a render prop over a higher order component :)