This is a repo for starting a react-native app using Redux.
There are some issues which they need to be addressed in the future:
- React-Native >= 0.16 use Babel 6 which doesn't support
Decorator
until T2645 lands in Babel. So for binding yourconnect
use the old style.
instead of this:
@connect(state => ({
state: state.counter
}))
class CounterApp extends Component {
}
export CounterApp;
use this:
class CounterApp extends Component {
}
export default connect(state => ({
state: state.counter
}))(CounterApp);
- Babel 6 doesn't like old .babelrc and you need to clean all .babelrc in your
node_modules
. I have provided a simplebash script
to clean all.babelrc
files.
once you install packages using npm install
, make sure to run npm run clean
to remove all .babelrc
inside node_modules
.
Cheers,