Project status
Use case
Generic react animation component.
Installation
You can install via package manager or simply download the compiled version as zip file here and inject:
npm install react-generic-animate
import {GenericAnimate} from 'react-generic-animate'
const Application = () => {
const [fadeState, setFadeState] = useState(false)
useEffect((): (() => void) => timeout(
() => {
setFadeState((value: boolean) => !value)
},
2 * 1000
).clear)
return <div>
<GenericAnimate in={fadeState} timeout={2000}>Fade it!</GenericAnimate>
<br/>
<GenericAnimate children="Fade it!" in={!fadeState} timeout={2000} />
</div>
}