react本机路由器流量遇到两个具有相同密钥的子节点
react native router flux Encountered two children with the same key
版本
- react native router flux v3.31.2
- react native v15.2.1
我不知道我做错了什么,但当我多次尝试调用Actions.dialog()
时,我出现了这个错误。
我认为这个解决方案https://github.com/aksonov/react-native-router-flux/issues/327修复了它,但它不是,它应该是其他的东西,但我没有主意。。。
我唯一没有这个的时候,是当我用pop((关闭它的时候。不幸的是,我不想弹出(它可能会破坏我应用程序中的其他功能(。
有人能帮忙吗?
错误:
`1:$dialog_1_dialog`. Child keys must be unique; when two children share a key, only the first child will be used.
in RCTView (created by View)
in View (created by Modal)
in Modal (created by DefaultRenderer)
in RCTView (created by View)
in View (created by DefaultRenderer)
in DefaultRenderer (created by SceneView)
in SceneView (created by NavigationCard)
in RCTView (created by View)
in View (created by AnimatedComponent)
in AnimatedComponent (created by NavigationCard)
in NavigationCard (created by Container)
in Container (created by NavigationComponent)
in NavigationComponent (created by NavigationAnimatedView)
in RCTView (created by View)
in View (created by NavigationAnimatedView)
in RCTView (created by View)
in View (created by NavigationAnimatedView)
in NavigationAnimatedView (created by NavigationComponent)
in NavigationComponent (created by DefaultRenderer)
in DefaultRenderer (created by NavigationRootContainer)
in NavigationRootContainer (created by Router)
in Router (created by Connect(Router))
in Connect(Router) (created by CdiscountReact)
in Provider (created by CdiscountReact)
in CdiscountReact
in RCTView (created by View)
in View (created by AppContainer)
in RCTView (created by View)
in View (created by AppContainer)
in AppContainer
2016-08-08 14:23:04.269 [warn][tid:com.facebook.react.JavaScript] Warning: flattenChildren(...): Encountered two children with the same key, `1:$dialog_2_dialog`. Child keys must be unique; when two children share a key, only the first child will be used.
in RCTView (created by View)
in View (created by Modal)
in Modal (created by DefaultRenderer)
in RCTView (created by View)
in View (created by DefaultRenderer)
in DefaultRenderer (created by SceneView)
in SceneView (created by NavigationCard)
in RCTView (created by View)
in View (created by AnimatedComponent)
in AnimatedComponent (created by NavigationCard)
in NavigationCard (created by Container)
in Container (created by NavigationComponent)
in NavigationComponent (created by NavigationAnimatedView)
in RCTView (created by View)
in View (created by NavigationAnimatedView)
in RCTView (created by View)
in View (created by NavigationAnimatedView)
in NavigationAnimatedView (created by NavigationComponent)
in NavigationComponent (created by DefaultRenderer)
in DefaultRenderer (created by NavigationRootContainer)
in NavigationRootContainer (created by Router)
in Router (created by Connect(Router))
in Connect(Router) (created by CdiscountReact)
in Provider (created by CdiscountReact)
in CdiscountReact
in RCTView (created by View)
in View (created by AppContainer)
in RCTView (created by View)
in View (created by AppContainer)
in AppContainer
代码
<Scene key="modal" component={Modal} >
<Scene key="root">
<Scene key="launch" initial={true} component={Launch} />
...
</Scene>
{/*Modals*/}
...
<Modal key="dialog" component={Dialog} direction="vertical"/>
</Scene>
希望能有所帮助:
<Modal key="dialog" clone component={Dialog} direction="vertical"/>
相关文章:
- API密钥使用和检查示例
- react.js中的密钥绑定
- JS对象密钥序列
- 似乎无法使用javascript从AWS 3S中删除密钥
- 加载两个具有相同父密钥名称的json文件
- 如何获取$data.Entity的密钥
- Angular ngRepeat:重复错误(尽管没有重复的密钥)
- CryptoJS和密钥/IV长度
- 基于api密钥的NodeJS web服务
- 选择<李>使用普通JavaScript的子节点,而不是孙节点
- 节点.js哈希,检索密钥
- 通过WebCryptoAPI而不是已浏览的节点加密模块在浏览器中生成ECDH密钥
- 如何在javascript中获取数组密钥对的json子值
- 使用xml2js构建具有相等子密钥的xml
- 如何使用 .push 或 set 在 Firebase 中创建新的子密钥
- 在嵌套json对象中查找和更新,而不更改不同子路径中的相同密钥对值
- 如何在节点中使用会话密钥的标头而不是cookie's Sails.js
- 当父密钥在Firebase中未知时,正在检索子记录
- react本机路由器流量遇到两个具有相同密钥的子节点
- 使用neo4j javascript驱动程序时,节点具有额外的密钥