Created
March 5, 2019 13:18
-
-
Save sintell/cb65a55b5fbbd631f96ff212786cb0d5 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
useEffect( | |
() => { | |
if (showedId === null || id === null) { | |
return; | |
} | |
toggleShow(showedId === id); | |
}, | |
[showedId] | |
); | |
useEffect( | |
() => { | |
if (show && showedId !== id) { | |
setShow(id); | |
} | |
} | |
); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment