Skip to content

Instantly share code, notes, and snippets.

@eden-lane
Created August 5, 2021 20:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save eden-lane/30e26eafa11d93b3de5b95b312359b5c to your computer and use it in GitHub Desktop.
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
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