Last active
January 17, 2021 12:06
-
-
Save AllanGraves/5ac5cdf93bf2fda36956fdbd4a525042 to your computer and use it in GitHub Desktop.
Changing default location using an effect
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
const Location = ({jsondata, locationID, storyID}) => { | |
useEffect(() => { | |
console.log('Resetting default location'); | |
setLocation(0); | |
}, [storyID]); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment