Przeglądaj źródła

Load props from props registry for redux screens

Guy Carmeli 7 lat temu
rodzic
commit
2c27564ef3
1 zmienionych plików z 2 dodań i 2 usunięć
  1. 2
    2
      src/Navigation.js

+ 2
- 2
src/Navigation.js Wyświetl plik

@@ -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