Pirogrammer
Pirogrammer

Reputation: 172

Make sure to start component names with a capital letter

Problem

I'm having an error using react-icons trying to use it:

Image

in header.js I checked for uncapitalized first letter but all of them were correct:

  <View style={styles.headerIcon}>
<TouchableOpacity  onPress={openMenu} >
  <MdMap />
</TouchableOpacity>
  </View> 

import 

What I have tried

Deleting react-icons then re-installing it yarn add react-icons --save.

Doing what the error says Make sure to start component names with capital letter.

And what I have tried didn't work.

I have fixed the error from the help of the answer below that worked for me.

Upvotes: 0

Views: 295

Answers (1)

Marek Lisik
Marek Lisik

Reputation: 2185

It appears this package cannot be used in react-native (component packages typically don't unless they specify compatibility with RN), and you should consider switching to something like react-native-vector-icons.

Upvotes: 1

Related Questions