tonyhb / redux-ui

Easy UI state management for react redux
636 stars 58 forks source link

Compilation error in react-native #51

Open walidvb opened 8 years ago

walidvb commented 8 years ago

Hey,

Couldn't find any help online or in IRC. I keep getting a compilation error when building:

screen shot 2016-07-12 at 17 13 22

I can't figure out what configuration to change to get it to work :( . here is my project: https://github.com/walidvb/passsport-mobile/tree/redux-ui

Thanks!

mauron85 commented 8 years ago

EDIT: Previous solution didn't actually worked.

Following should work for react-native version: 0.33

According to this there might be conflicting .babelrc. In my case it was redux-ui itself.

So I had to delete it:

rm node_modules/redux-ui/.babelrc

Then installed (version 1.0.1)

npm i babel-preset-react-native-stage-0 --save-dev

Created .babelrc in root dir with:

{
    "presets": [
        "react-native-stage-0/decorator-support"
    ]
}

Reset cache after installing modules:

watchman watch-del-all
./node_modules/react-native/packager/packager.sh start --reset-cache