facebookarchive / react-native-custom-components

Breaking apart the Libraries/CustomComponents part of the React Native repo
Other
70 stars 157 forks source link

Add Replace With Animation feature to Navigator #8

Open DaniAkash opened 7 years ago

DaniAkash commented 7 years ago

New feature This commit will add replaceWithAnimation function to the Navigator component which will allow the user to replace a route while having the default transition animation of the target scene.

fixes facebook/react-native#1981

Implemented based of Stack-Overflow solution - http://stackoverflow.com/questions/40393380/react-native-transition-animation-for-navigator-replace

Test plan the following repository ReactNativeNavigationDemo (branch replaceWithAnimation) has a page implemented using the replaceWithAnimation function in SplashPage.js which replaces the splash page with the homepage and it is tested with various use cases and found that the component is working as expected.

This Pull request was previously created at https://github.com/facebook/react-native/pull/12881