Reputation: 121
Started a project with create-react-app. Installed react-native: "^0.57.8",react-native-elements: "^0.19.1" and react-native-vector-icons: "^6.1.0". To be able to use components within react-native-elements within a project.
When I run npm start
I get the error code pasted below. I've read through the the react-native-elements documentation but can't seem to find anything to help me
./node_modules/react-native-elements/src/avatar/Avatar.js
SyntaxError: D:\Location-Map\Neighborhood-Map-2-\location-
app\node_modules\react-native-elements\src\avatar\Avatar.js: Unexpected
token (92:8)
90 |
91 | return (
> 92 | <TouchableHighlight
| ^
93 | style={[
94 | styles.editButton,
95 | editButtonSizeStyle,
Upvotes: 11
Views: 1069
Reputation: 14786
You can't do that (read here if you want to know why). Do you want to build a web app? Use React with create-react-app
. Do you want to build a mobile app? Use React Native with Expo or react-native init
.
I suggest you look into material-ui
as a component library for React.
Upvotes: 1