Just started learning react-native,
I have created one separate file flexdemo.js and created component as below:
import React, { Component } from \'react
I have encountered the same issue just now and solved it by removing the comments that I have made while editing the project in android studio and over there the comment's shorotcut just adds /* and */ but actually for react native the commented code should be enclosed with starting and end of curly braces, for example following would be an invalid comment:
/*
{
this.state.response.map((index, value) => {
return index.title;
})
}
*/
And the following will be a valid one:
{/*
{
this.state.response.map((index, value) => {
return index.title;
})
}
*/}
you see there is just one minor difference of enclosing the comment in curly braces.