Skip to content

Commit

Permalink
forgot transitioning component
Browse files Browse the repository at this point in the history
  • Loading branch information
adkenyon committed Feb 20, 2020
1 parent 51246dd commit adc3d52
Showing 1 changed file with 17 additions and 1 deletion.
18 changes: 17 additions & 1 deletion mock.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,20 @@ function createMockComponent(name) {
};
}

function createTransitioningComponent(Component) {
return class extends React.Component {
static displayName = `Transitioning.${Component.displayName || Component.name || 'Component'}`;

setNativeProps() {}

animateNextTransition() {}

render() {
return <Component {...this.props} />;
}
};
}

const Reanimated = {
SpringUtils: {
makeDefaultConfig: NOOP,
Expand Down Expand Up @@ -189,5 +203,7 @@ module.exports = {
In: createMockComponent('Transition.In'),
Out: createMockComponent('Transition.Out'),
Change: createMockComponent('Transition.Change')
}
},

createTransitioningComponent,
};

0 comments on commit adc3d52

Please sign in to comment.