Explorar el Código

Load props from props registry for redux screens

Guy Carmeli hace 6 años
padre
commit
2c27564ef3
Se han modificado 1 ficheros con 2 adiciones y 2 borrados
  1. 2
    2
      src/Navigation.js

+ 2
- 2
src/Navigation.js Ver fichero

@@ -67,13 +67,13 @@ function _registerComponentRedux(screenID, generator, store, Provider, options)
67 67
       constructor(props) {
68 68
         super(props);
69 69
         this.state = {
70
-          internalProps: {...props, ...PropRegistry.load(props.screenInstanceID)}
70
+          internalProps: {...props, ...PropRegistry.load(props.screenInstanceID || props.passPropsKey)}
71 71
         }
72 72
       }
73 73
 
74 74
       componentWillReceiveProps(nextProps) {
75 75
         this.setState({
76
-          internalProps: {...PropRegistry.load(this.props.screenInstanceID), ...nextProps}
76
+          internalProps: {...PropRegistry.load(this.props.screenInstanceID || this.props.passPropsKey), ...nextProps}
77 77
         })
78 78
       }
79 79