0.1.1 • Published 2 years ago

reanima v0.1.1

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

reanima

Animate react components with debug player that can rewind

  1. Create animated component like:
const Counter = () => {
  const frame = useFrame()
  const color = interpolateColors(frame, [0, 60], ['white', 'red'])

  return <div style={{ color }}>{frame}</div>
}
  1. Wrap you component with debug player like:
const counter = withPlayer(({ useFrame }) => {
  ...
})
  1. Debug
  1. Remove withPlayer wrapper and you ready to deploy. Profit!