re: You don't have to use Redux VIEW POST

TOP OF THREAD FULL DISCUSSION
re: Great post! We additionally use a HoC to make using the Context API easier. Something like this: const withUser = (Component) => ( (props)...
 

Would suggest to use useContext, either directly, or in the HOC:

const withUser = (Component) =>
  (props) => {
    const user = useContext(UserContext)
    return <Component {...props} user={user} />
  }
 

Yep you sure could! The original example was without hooks, so I went that route.

code of conduct - report abuse