Created
November 22, 2020 23:17
-
-
Save jamiehaywood/89d2e8c86576a85de52e5ffdc23992ad to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from "react"; | |
import { useGlobalState } from "./GlobalStateProvider"; | |
const PageTwo = () => { | |
const { state } = useGlobalState(); | |
return ( | |
<div> | |
<h1>State from PageOne:</h1> | |
<h2>Name:</h2> | |
<p>{`${state.firstname} ${state.lastname}`}</p> | |
<h2>Age:</h2> | |
<p>{state.age}</p> | |
</div> | |
); | |
}; | |
export default PageTwo; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment