-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Home
Thanks for upgrading!
Before checking the list of changes, this visualization might be enough.
-
spring()
now has its signature changed fromspring(value, [stiffness, damping])
tospring(value, {stiffness: ..., damping: ..., precision: ...})
. If you used e.g.spring(10, presets.gentle)
, this stays the same (presets
has been changed to use objects instead so no refactoring needed). -
Motion
'sstyle
now only takes values intended to be interpolated. Previously it allowed you to pass{x: spring(0), y: 'randomUnrelatedStuffHere'}
. This is now disallowed. Simply pass them to the component you're styling in yourchildren
function. -
Same applies for
StaggeredMotion
andTransitionMotion
. The latter is a bit tricky, since you might have wanted to carry around the extra data of the unmounted style configuration. Fortunately,TransitionMotion
's whole API got a revamp and made this use-case cleaner. See the README for more info. -
The
TransitionMotion
API changes from usingstyles
object tostyles
array, thus makingreorderKeys
unnecessary. It's now removed. -
Subtle change: strengthened the
defaultStyle
/defaultStyles
/willEnter
format. No longer allowed to passspring()
configs in these since these are starting values and the configs only applied to destination values (style
/styles
/willLeave
). -
React-Native build is now gone since RN v0.18+ uses the vanilla NPM React.
-
Miscellaneous perf improvements, type friendliness, bug fixes.