Hacker News new | ask | show | jobs
by brianvaughn 3001 days ago
No, but you could do it in a similar way as the "Dynamic Context" example [1] - store the authenticated user/status in component `state` and pass it down via a AuthenticationContext.Provider. Then anything that needs to know about it could use the AuthenticationContext.Consumer.

1: https://reactjs.org/docs/context.html#dynamic-context