Repository URL to install this package:
|
Version:
3.1.7 ▾
|
Legend:
^0.14.9 || ^15.3.0didLeave for TransitionMotion! Please check the README for more.TransitionMotion styles function not being passed defaultStyles value upon first call. #296onRest callback for Motion!TransitionMotion keys merging bug. #264TransitionMotion rare stale read bug. https://github.com/chenglou/react-motion/commit/f20dc1b9c8de7b387927b24afdb73e0a5ea0d0a6spring helper's format has changed from spring(10, [120, 12]) to spring(10, {stiffness: 120, damping: 12}).style, styles and styles of the three respective components now only accept either a number to interpolate, or a spring configuration to interpolate. Previously, it accepted (and ignored) random key/value pairs mixed in, such as {x: spring(0), y: 'helloWorld'}. y Doesn't belong there and should be placed elsewhere, e.g. directly on the (actual react) style of the component you're assigning the interpolating values on.TransitionMotion got an all-around clearer API. See the upgrade guide and README section for more.Motion's' defaultStyle, informally accepted the format {x: spring(0)}. This is now officially unsupported. The correct format has always been {x: 0}. Setting a default style of {x: spring(whatever)} did not make sense; the configuration only applies for a style, aka destination value. Same modification applies to StaggeredMotion and TransitionMotion's defaultStyles & willEnter.TransitionMotion's willEnter/willLeave's signature has changed.reorderKeys helper is no longer needed thanks to the changes to TransitionMotion. It's now removed.spring has acquired a new field as part of the new signature: precision tuning!null and undefined in style/styles. #181src/ folder is now exposed on npm so that you can take advantage of Flow by using: import {Motion} from 'react-motion/src/react-motion' directly, instead of the old, prebuilt import {Motion} from 'react-motion'. This is experimental and intentionally undocumented. You'll have to adjust your webpack/browserify configurations to require these original source files correctly. No harm trying of course. It's just some type annotations =).require('react-motion/native').null from children function. #101defaultValue for specifying a... default value, upon mounting.TransitionSpring's willLeave API got simplified and now asks for an object as a return value instead of null. null is still supported, but is deprecated and will be removed in the next version. See the new docs on it here.presets.willLeave returning false will now keep the key. Only null and undefined will serve as a signal to kill the disappeared key.willLeave previously failed to expose the second argument correspondingValueOfKeyThatJustLeft. It's now exposed correctly.willLeave is now called only once per disappearing key. It was called more than once previously as a implementation detail. Though you should never have put side-effects in willLeave. It's still discouraged now.this.props.handlerThatSetStateAndUnmountsSpringInOwnerRender() in Spring's endValue, Spring's already scheduled requestAnimationFrame will no longer cause an extra setState since it's unmounted. But in general, please don't put side-effect in endValue.requestAnimationFrame). #57requestAnimationFrame polyfill.TransitionSpring's willEnter's callback signature is now (keyThatEnters, correspondingValue, endValueYouJustSpecified, currentInterpolatedValue, currentSpeed) (added correspondingValue as the second argument). Same for willLeave.Spring is now no longer exposed as a default, but simply as "Spring": require('react-motion').Spring. Or import {Spring} from 'react-motion'.Spring and TransitionSpring's children function now expect a ReactElement. The components will no longer wrap the return value in a div for you. #44 #20endValue without {val: ...} wrapper.