Last active
August 11, 2019 12:10
-
-
Save BenBrostoff/34a93255596772fa1942757359ff371d to your computer and use it in GitHub Desktop.
Simply sync act
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
export const App = () => { | |
const [data, setData] = useState('unloaded value'); | |
useEffect(() => { | |
setData('sync val'); | |
}, []); | |
return ( | |
<div> | |
<h2>{data}</h2> | |
</div> | |
); | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment