Skip to content

Instantly share code, notes, and snippets.

View eden-lane's full-sized avatar
🗓️
Working on getweek.pro

eden lane eden-lane

🗓️
Working on getweek.pro
View GitHub Profile
@eden-lane
eden-lane / 1.ts
Created August 5, 2021 20:58
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},