Advertisement
Guest User

Untitled

a guest
Jun 26th, 2019
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.35 KB | None | 0 0
  1. return (
  2. <AuthorizationContext.Provider
  3. value={{ isAuthorized: this.state.isAuthorized }}
  4. >
  5. {this.props.children}
  6. </AuthorizationContext.Provider>
  7.  
  8. <AuthorizationConsumer>
  9. {({ isAuthorized}) => {
  10. return (
  11. // some code here
  12. )
  13. }}
  14. </AuthorizationConsumer>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement