Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class ParentComponent extends Component {
- render() {
- return (
- <MyContext.Consumer>
- {(context) => {
- if(axiosSuccess) {context.updateContextState(parentState);}
- return (
- <ChildComponent/>
- )
- }}
- </MyContext.Consumer>
- );
- }
- }
Add Comment
Please, Sign In to add comment