Skip to content

Commit

Permalink
fix animate not re-register props
Browse files Browse the repository at this point in the history
  • Loading branch information
bluebill1049 committed Feb 15, 2019
1 parent 4623331 commit efcba01
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/animate.js
Expand Up @@ -75,9 +75,10 @@ export class AnimateChild extends React.PureComponent<Props, State> {
};

static getDerivedStateFromProps(nextProps: Props, prevState: State) {
const { animationStates, play, sequenceId, sequenceIndex, onCompleteStyle } = nextProps;
const { animationStates, play, sequenceId, sequenceIndex, onCompleteStyle, register } = nextProps;
const id = sequenceId || sequenceIndex;
let currentPlay = play;
register && register(nextProps);

if (id !== undefined && animationStates && animationStates[id]) {
const state = animationStates[id];
Expand Down

0 comments on commit efcba01

Please sign in to comment.