You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
## Example Project using React-Native 0.16 and Redux 3.0.4
1
+
## Example Project using React-Native 0.18.-rc and Redux 3.0.4 and React-Redux 4.0.5
2
2
3
3
This is a repo for starting a react-native app using Redux.
4
4
5
-
There are some issues which they need to be addressed in the future:
6
-
- React-Native >= 0.16 use Babel 6 which doesn't support `Decorator` until T2645 lands in Babel. So for binding your `connect` use the old style.
5
+
### Usage
7
6
7
+
clone the project and run `npm install`.
8
8
9
-
instead of this:
10
-
11
-
```js
12
-
@connect(state=> ({
13
-
state:state.counter
14
-
}))
15
-
classCounterAppextendsComponent {
16
-
17
-
}
18
-
19
-
exportCounterApp;
20
-
```
21
-
22
-
use this:
23
-
24
-
```js
25
-
classCounterAppextendsComponent {
26
-
27
-
}
28
-
29
-
exportdefaultconnect(state=> ({
30
-
state:state.counter
31
-
}))(CounterApp);
32
-
```
33
-
34
-
- Babel 6 doesn't like old .babelrc and you need to clean all .babelrc in your `node_modules`. I have provided a simple `bash script` to clean all `.babelrc` files.
35
-
36
-
once you install packages using `npm install`, make sure to run `npm run clean` to remove all `.babelrc` inside `node_modules`.
37
-
9
+
I have to do couple of cleanup after `npm install` you can follow up on this [react-redux issue](https://github.com/rackt/react-redux/issues/236)
0 commit comments