Przeglądaj źródła

Fix order of `registerComponentWithRedux` arguments (#3933)

The actual `registerComponentWithRedux` function definition is the following:
```
    registerComponentWithRedux(componentName, getComponentClassFunc, ReduxProvider, reduxStore) {
        return this.componentRegistry.registerComponent(componentName, getComponentClassFunc, ReduxProvider, reduxStore);
    }
```

Note the order of `store` and `provider` are the opposite as shown in the original documentation.  This will fix it, but it's worth mentioning that v1 has the order shown in the original documentation, so it would be nice to keep the parameter order the same in v2.
Adam Terlson 6 lat temu
rodzic
commit
c21b5efa6f
1 zmienionych plików z 3 dodań i 3 usunięć
  1. 3
    3
      docs/docs/third-party.md

+ 3
- 3
docs/docs/third-party.md Wyświetl plik

2
 
2
 
3
 ## Redux
3
 ## Redux
4
 
4
 
5
-### registerComponentWithRedux(screenID, generator, store, provider)
5
+### registerComponentWithRedux(screenID, generator, Provider, store)
6
 Utility helper function like registerComponent,
6
 Utility helper function like registerComponent,
7
 wraps the provided component with a react-redux Provider with the passed redux store
7
 wraps the provided component with a react-redux Provider with the passed redux store
8
 
8
 
9
 ```js
9
 ```js
10
-Navigation.registerComponentWithRedux('navigation.playground.WelcomeScreen', () => WelcomeScreen, store, provider);
11
-```
10
+Navigation.registerComponentWithRedux('navigation.playground.WelcomeScreen', () => WelcomeScreen, Provider, store);
11
+```