javascript - react native router flux Encountered two children with the same key -
version(s)
- react-native-router-flux v3.31.2
- react-native v15.2.1
i don't know i'm doing wrong when try call actions.dialog()
multiple times, got error.
i thought fix https://github.com/aksonov/react-native-router-flux/issues/327 fixed isn't, should else i'm out of ideas ...
the time dont have this, when use pop() close it. unfortunalty, dont want pop (it may break other functionalities in app).
could ?
the error :
`1:$dialog_1_dialog`. child keys must unique; when 2 children share key, first child used. in rctview (created view) in view (created modal) in modal (created defaultrenderer) in rctview (created view) in view (created defaultrenderer) in defaultrenderer (created sceneview) in sceneview (created navigationcard) in rctview (created view) in view (created animatedcomponent) in animatedcomponent (created navigationcard) in navigationcard (created container) in container (created navigationcomponent) in navigationcomponent (created navigationanimatedview) in rctview (created view) in view (created navigationanimatedview) in rctview (created view) in view (created navigationanimatedview) in navigationanimatedview (created navigationcomponent) in navigationcomponent (created defaultrenderer) in defaultrenderer (created navigationrootcontainer) in navigationrootcontainer (created router) in router (created connect(router)) in connect(router) (created cdiscountreact) in provider (created cdiscountreact) in cdiscountreact in rctview (created view) in view (created appcontainer) in rctview (created view) in view (created appcontainer) in appcontainer 2016-08-08 14:23:04.269 [warn][tid:com.facebook.react.javascript] warning: flattenchildren(...): encountered 2 children same key, `1:$dialog_2_dialog`. child keys must unique; when 2 children share key, first child used. in rctview (created view) in view (created modal) in modal (created defaultrenderer) in rctview (created view) in view (created defaultrenderer) in defaultrenderer (created sceneview) in sceneview (created navigationcard) in rctview (created view) in view (created animatedcomponent) in animatedcomponent (created navigationcard) in navigationcard (created container) in container (created navigationcomponent) in navigationcomponent (created navigationanimatedview) in rctview (created view) in view (created navigationanimatedview) in rctview (created view) in view (created navigationanimatedview) in navigationanimatedview (created navigationcomponent) in navigationcomponent (created defaultrenderer) in defaultrenderer (created navigationrootcontainer) in navigationrootcontainer (created router) in router (created connect(router)) in connect(router) (created cdiscountreact) in provider (created cdiscountreact) in cdiscountreact in rctview (created view) in view (created appcontainer) in rctview (created view) in view (created appcontainer) in appcontainer
the code
<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>
hope can help:
<modal key="dialog" clone component={dialog} direction="vertical"/>
Comments
Post a Comment