【问题标题】:Shared attribute with react-navigation-fluid-transitions not workingreact-navigation-fluid-transitions 的共享属性不起作用
【发布时间】:2019-09-13 18:46:56
【问题描述】:

我在 React Native 中制作了一个应用程序,发现了一个很酷的 transition library。 除了shared="name" 属性,一切正常。 shared 属性应该在导航前移动和翻转元素之间进行元素的平滑过渡。导航工作正常。

屏幕1

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

屏幕2

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

如果我有 shared 到相同的名称,我会收到这个没有多大帮助的错误,如果我没有相同的名称,显然转换不会按预期工作:

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

有没有人使用过这个库并让shared 工作?查看文档并找到了working example,但无法弄清楚我的代码有什么问题。

这里是所有MY CODE的pastebin

【问题讨论】:

    标签: reactjs react-native navigation transition


    【解决方案1】:

    你只是在某个地方搞砸了。这是您的工作示例https://snack.expo.io/Hyk806!HI

    【讨论】:

      猜你喜欢
      • 2018-12-17
      • 2019-04-27
      • 2022-06-25
      • 1970-01-01
      • 2020-06-05
      • 1970-01-01
      • 1970-01-01
      • 2021-01-03
      • 2021-04-05
      相关资源
      最近更新 更多