11

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,

1 Answer 1

1

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.

Sign up to request clarification or add additional context in comments.

1 Comment

You can do that with react-native-web

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.