Created
October 18, 2020 11:33
-
-
Save meetzaveri/aeab2230b872610dc1d18c17d9d951c6 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, { useEffect } from 'react'; | |
import ProfilePage from './ProfilePage'; | |
const ProfileContainer = () => { | |
useEffect(() => { | |
fetch('/api/user') // perform any side effects or network requests | |
}, []); // <-- empty array means 'run once' | |
return <ProfilePage />; | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment