Search code examples
reactjsreact-nativenavigationtransition

Shared attribute with react-navigation-fluid-transitions not working


I making a app in React native and found a cool transition library. Everything works fine exept the shared="name" attribute. The shared attribute is supposed to make a smooth transition of elements between navigations ex move and flip element. Navigation works fine.

Screen1

<Transition appear="left" shared='paper'>
 <View style={styles.paper1} />
</Transition>

Screen2

<Transition shared='paper'>
 <View style={styles.paper2} />
</Transition>

If i have shared to same names I get this error that dont help a lot, and if i dont have same name obviously the transition is not working as expected:

TypeError: undefined is not an object (evaluating 'this._callListeners.bind')
- node_modules\react-native\Libraries\Animated\src\AnimatedEvent.js:94:46 in AnimatedEvent
- node_modules\react-native\Libraries\Animated\src\AnimatedImplementation.js:504:42 in event
- ... 37 more stack frames from framework internals

Has anyone used this library and got shared to work? Looked at the doc and found a working example but cant figure out what is wrong with my code.

Here is a pastebin of all MY CODE


Solution

  • You just messed up somewhere. Here is your working example https://snack.expo.io/Hyk806!HI