Created
August 10, 2019 09:49
-
-
Save ShivamJoker/ed9acf8ddc69a7a9f186d2618b2ab0ae 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
<motion.div | |
initial={{ opacity: 0, scale: .8}} | |
animate={{ opacity: 1, scale: 1 }} | |
exit={{ opacity: 0, scale: .8 }} | |
> | |
<List> | |
{renderResult} | |
</List> | |
</motion.div> |
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
<AnimatePresence exitBeforeEnter initial={false}> | |
<Switch key={location.pathname}> | |
<Route | |
path="/liked" | |
render={props => { | |
setTabValue(1); | |
return <RenderDatabase songs={songsLikedState} {...props} />; | |
}} | |
/> | |
<Route | |
path="/downloads" | |
render={props => { | |
setTabValue(2); | |
return <RenderDatabase songs={songsDownloadedState} />; | |
}} | |
/> | |
<Route | |
path="/history" | |
render={props => { | |
setTabValue(3); | |
return <RenderDatabase songs={songsHistoryState} />; | |
}} | |
/> | |
</Switch> | |
</AnimatePresence> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment