yarn add react-native globally window code example
Example: install yarn in react native
npm install -g yarn
yarn global add react-native-cli
react-native init sample
npm install -g yarn
yarn global add react-native-cli
react-native init sample