Browse Source

Load props from props registry for redux screens

Guy Carmeli 6 years ago
parent
commit
2c27564ef3
1 changed files with 2 additions and 2 deletions
  1. 2
    2
      src/Navigation.js

+ 2
- 2
src/Navigation.js View File

67
       constructor(props) {
67
       constructor(props) {
68
         super(props);
68
         super(props);
69
         this.state = {
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
       componentWillReceiveProps(nextProps) {
74
       componentWillReceiveProps(nextProps) {
75
         this.setState({
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