Browse Source

Revert "Don't custom button props over the bridge (#2174)" (#2177)

This reverts commit e69f3801b9.
Guy Carmeli 7 years ago
parent
commit
e2f5589087
No account linked to committer's email address
2 changed files with 2 additions and 8 deletions
  1. 2
    2
      src/Navigation.js
  2. 0
    6
      src/deprecated/platformSpecificDeprecated.android.js

+ 2
- 2
src/Navigation.js View File

@@ -36,13 +36,13 @@ function _registerComponentNoRedux(screenID, generator) {
36 36
       constructor(props) {
37 37
         super(props);
38 38
         this.state = {
39
-          internalProps: {...props, ...PropRegistry.load(props.screenInstanceID || props.passPropsKey)}
39
+          internalProps: {...props, ...PropRegistry.load(props.screenInstanceID)}
40 40
         }
41 41
       }
42 42
 
43 43
       componentWillReceiveProps(nextProps) {
44 44
         this.setState({
45
-          internalProps: {...PropRegistry.load(this.props.screenInstanceID || props.passPropsKey), ...nextProps}
45
+          internalProps: {...PropRegistry.load(this.props.screenInstanceID), ...nextProps}
46 46
         })
47 47
       }
48 48
 

+ 0
- 6
src/deprecated/platformSpecificDeprecated.android.js View File

@@ -2,7 +2,6 @@
2 2
 import React, {Component} from 'react';
3 3
 import ReactNative, {AppRegistry, NativeModules, processColor} from 'react-native';
4 4
 import _ from 'lodash';
5
-import PropRegistry from './../PropRegistry';
6 5
 
7 6
 import Navigation from './../Navigation';
8 7
 
@@ -332,11 +331,6 @@ function navigatorSetButtons(navigator, navigatorEventID, _params) {
332 331
       if (button.buttonColor) {
333 332
         button.color = processColor(button.buttonColor);
334 333
       }
335
-      if (button.component) {
336
-        const passPropsKey = _.uniqueId('customButtonComponent');
337
-        PropRegistry.save(passPropsKey, button.passProps);
338
-        button.passProps = {passPropsKey};
339
-      }
340 334
     });
341 335
   }
342 336
   let leftButton = getLeftButton(params);