If you need to add a new dependency to the project, it is important to add them in the right way. Instructions for adding different types of dependencies are described below.
npm add -E <package-name>
react-native link <package-name> in a terminal.
Be aware that we are using React Native Navigation. For Android, you might need to complete the linking process manually as the
react-native link command won’t do it for you.
To do this, after running the
react-native link command, head to
<project-root>/android/app/src/main/java/com/mattermost/rnbeta/MainApplication.java and initialize the react native library that you just added in the
Usually the React Native libraries that you add to the project will take care of adding new dependencies to the project.
If you come across a case where adding new dependencies manually is needed, we recommend you first review your work to confirm the need. The Android documentation should then be followed to add the libraries.
Sometimes you may need to add iOS specific dependencies that React Native cannot normally link. These will be in the form of Cocoapods.
To add them, edit the
Podfile located in the
ios directory, then from that directory run
pod install to update the
. ├── android # Android specific code ├── app # React Native code │ ├── actions │ ├── components │ ├── constants │ ├── i18n │ ├── mattermost_managed │ ├── notification_preferences │ ├── push_notifications │ ├── reducers │ ├── screens │ ├── selectors │ ├── store │ ├── styles │ └── utils ├── assets │ ├── base │ │ ├── i18n │ │ ├── images │ │ └── release │ └── fonts ├── coverage ├── dist │ └── assets │ ├── i18n │ ├── images │ └── release ├── docs ├── fastlane ├── ios # iOS specific code ├── scripts └── test