Reputation: 117
I'm installing react-native-elements and in the installation guide there is this command:
npm i react-native-vector-icons --save && react-native link react-native-vector-icons
I am curious what this part of the command does and why it is necessary: react-native link react-native-vector-icons
Upvotes: 3
Views: 331
Reputation: 9701
As you might know, React Native allows you to interface with the native APIs of the OS via JavaScript. In order to establish this interface, some configuration is required in the native side (linking libraries, adding search paths and assets...), and since this process is relatively repetitive and can be automated, the RN folks made the link
command in order to set up modules with native code more easily. In the case of React Native Vector Icons, it will add the font files and other configuration to your project, for both Android and iOS.
Upvotes: 2