Releases: inokawa/react-animatable
Releases · inokawa/react-animatable
0.13.2
Update description.
Full Changelog: 0.13.1...0.13.2
0.13.1
- Updated readme.
- Make bundle size bit smaller.
Full Changelog: 0.13.0...0.13.1
0.13.0
- Fixed
useAnimation
anduseAnimationFunction
to be able to pass some argument when play.
const animate = useAnimation<{ x: number; y: number }>(
(prev, args) => [
{ transform: prev.transform },
{ transform: `translate(${args.x}px, ${args.y}px)` },
],
{
duration: 400,
easing: "ease-in-out",
}
);
useEffect(() => {
animate.play({ args: { x: 100, y: 200 } });
}, [])
- BREAKING: removed
useAnimationController
hook andpersist
method in favor ofprev
andargs
functionality ofuseAnimation
. - BREAKING: renamed
AnimationGroup
toTransitionGroup
What's Changed
- Remove persist method in favor of keyframe function by @inokawa in #22
- Support dynamic keyframe by @inokawa in #23
- Remove useAnimationController by @inokawa in #24
- Add argument to useAnimationFunction by @inokawa in #25
- Rename AnimationGroup to TransitionGroup by @inokawa in #26
Full Changelog: 0.12.1...0.13.0
0.12.1
Support Next.js and SSR.
Full Changelog: 0.12.0...0.12.1
0.12.0
What's Changed
BREAKING: ref field was remove from AnimationHandle
and AnimationController
type. Just pass them directly to target element!
const animate = useAnimation(...);
return <div ref={animate}>...</div>
- Remove ref field and make animation handle callable by @inokawa in #17
- Improve type of animation handle by @inokawa in #18
Full Changelog: 0.11.1...0.12.0
0.11.1
Improve build setting
Full Changelog: 0.11.0...0.11.1
0.11.0
- BREAKING: Remove .js extension from path of react/jsx-runtime. If you use webpack 5, use react >= 18 to avoid Can't resolve
react/jsx-runtime
error.
0.10.3
- Fix useAnimation to accept function as keyframe
Full Changelog: 0.10.2...0.10.3
0.10.2
- Persist style in useTransitionAnimation
Full Changelog: 0.10.1...0.10.2
0.10.1
- Ignore uncaught promise error in useTransitionAnimation hook
Full Changelog: 0.10.0...0.10.1