← React Intermediate Questions - Set 5 Q45

What are Higher-Order Components (HOCs) in React?

React Intermediate Questions - Set 5

Example

const withAuth = (C) => (props) => isLogged() ? <C {...props} /> : <Login />;

What to notice

← Back to the question list