-
-
Save eden-lane/30e26eafa11d93b3de5b95b312359b5c to your computer and use it in GitHub Desktop.
Three react-spring animations to make your app stand out from the crowd
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
import {useTransition, animated} from 'react-spring'; | |
import {useLocation} from 'react-router-dom'; | |
export const Sidebar = () => { | |
const location = useLocation(); | |
const transition = useTransition(location.pathname, { | |
from: {opacity: 0, y: 50}, | |
enter: {opacity: 1, y: 0}, | |
exit: {opacity: 0, y: 50}, | |
}); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment