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
// from Addison Schulz @framer https://github.com/addisonschultz/pagination | |
export function CrossFadeEffect(): Override { | |
return { | |
effect(info) { | |
return { | |
opacity: 1 - Math.abs(info.normalizedOffset), | |
x: -info.offset, | |
} | |
}, |
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 * as React from "react" | |
import { useState, useEffect } from "react" | |
/* | |
from Koen Bok | |
A hook to simply use state between components | |
Usage: | |