chenglou / chenglou/react-motion

Question about TransitionMotion ( adding spring effect)

Open
#323 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
21.9k
Forks
1.1k
PR merge metrics
No merged PRs in 30d

Description

I know we can defined `willLeave` to animate leaving nodes in TransitionMotion.
I am just wondering, if we can add `spring` behaviors between two rendering:

For example, the first render has something like:
`items: [{key: 'a', left: 10}, {key: 'b', left: 20}, {key: 'c', left: 30}]`
then, in the next render, the left has been changed:
`items: [{key: 'a', left: 0}, {key: 'b', left: 10}, {key: 'c', left: 20}]`

I am wondering, how to make the nodes 'spring' ( animate to their new position ) to their next position? Is it possible to achieve in TransitionMotion?

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.