classMyComponentextendsComponent { render() { // Access the auth context from the `auth0` prop const { user } = this.props.auth0; return<div>Hello {user.name}!</div> } } // Wrap your class component in withAuth0 exportdefaultwithAuth0(MyComponent);
Wrap your class components in this Higher Order Component to give them access to the Auth0Context.
Providing a context as the second argument allows you to configure the Auth0Provider the Auth0Context
should come from f you have multiple within your application.
Wrap your class components in this Higher Order Component to give them access to the Auth0Context.
Providing a context as the second argument allows you to configure the Auth0Provider the Auth0Context should come from f you have multiple within your application.