Error using async/await in React Native
When trying to use async/await in react-native, I am getting the following error:
uncaught error Error: SyntaxError: /Users/senthilsivanath/Documents/MusicTulip/index.ios.js: Unexpected token (50:23)
48 | renderScene: function(route,nav) {
49 | try {
50 | const response = await signIn.isLoggedIn();
My .babelrc file …
Error: Missing class properties transform
Error: Missing class properties transform
Test.js:
export class Test extends Component {
constructor (props) {
super(props)
}
static contextTypes = {
router: React.PropTypes.object.isRequired
}
.babelrc:
{
"presets": ["es2015", "react", "stage-0"],
"plugins": ["transform-class-properties"]
}
package.json:
"babel-core": "^6.5.1",
"babel-eslint": "^4.1.8",
"babel-loader": "^6.2.2",
"babel-plugin-react-transform": "^2.0.0",
"babel-plugin-transform-class-properties": "^6.5.2",
"babel-preset-es2015": "^6.5.0",
"babel-preset-react": "^6.5.0",
"babel-preset-stage-0": "^6.5.0",
"…