In React native I'm simply applying a Flatlist from react native library. Succefully installed all libraries
pakage.json
"dependencies": {
"feather-icons-react": "^0.3.0",
"react": "16.6.3",
"react-native": "0.57.8",
"react-native-elements": "^1.0.0-beta7",
"react-native-vector-icons": "^4.2.0"
},
"devDependencies": {
"babel-jest": "23.6.0",
"jest": "23.6.0",
"metro-react-native-babel-preset": "0.51.0",
"react-test-renderer": "16.6.3"
},
"jest": {
"preset": "react-native"
}
}
App.js
import React, {Component} from 'react';
import Main from './components/MainComponents';
const instructions = Platform.select({
ios: 'Press Cmd+R to reload,\n' + 'Cmd+D or shake for dev menu',
android:
'Double tap R on your keyboard to reload,\n' +
'Shake or press menu button for dev menu',
});
type Props = {};
export default class App extends Component<Props> {
render() {
return (
<Main />
);
}
}
error log
error: bundling failed: Error: Unable to resolve module `react-native-vector-icons/Feather` from `F:\React Native\FirstProject\node_modules\react-native-elements\src\helpers\getIconType.js`: Module `react-native-vector-icons/Feather` does not exist in the Haste module map
newbie to react native
Help will be highy appreciated
Thankyou
Just follow these steps: Browse to node_modules/react-native-vector-icons and drag the folder Fonts (or just the ones you want) to your project in Xcode. Make sure your app is checked under "Add to targets" and that "Create groups" is checked if you add the whole folder.
To install react-native-vector-icons, you need to install it, then link it. First run:npm install react-native-vector-icons --save
or if you use yarnyarn add react-native-vector-icons
Then, you will have to link it like this:react-native link react-native-vector-icons
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With