Installing previous versions
Depending on which version of React Native we are building our project with, we will need to install a specific version or range of versions. The list of versions to be installed can be found in the previous chapter, so now we are going to learn how to install one of those specific versions:
- Identify which React Native version our project is using. For this, we can check our
package.json
file at the root of our React Native app project. Inside this file, look for thereact-native
dependency and note down the version number:
- Look at the
lottie-react-native
/react-native
compatibility list in the previous chapter and select the rightlottie-react-native
for your project. - Install the selected version of
lottie-react-native
using npm or Yarn by specifying that version number after an@
sign, for example,npm install –save lottie-react...