Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- return (
- <AuthorizationContext.Provider
- value={{ isAuthorized: this.state.isAuthorized }}
- >
- {this.props.children}
- </AuthorizationContext.Provider>
- <AuthorizationConsumer>
- {({ isAuthorized}) => {
- return (
- // some code here
- )
- }}
- </AuthorizationConsumer>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement