Setup React Native environment with Typescript

Set up the environment

$ brew install node
$ brew install watchman
$ npm install -g typescript
$ brew install --cask adoptopenjdk/openjdk/adoptopenjdk8
export ANDROID_HOME=$HOME/Library/Android/sdk
export PATH=$PATH:$ANDROID_HOME/emulator
export PATH=$PATH:$ANDROID_HOME/tools
export PATH=$PATH:$ANDROID_HOME/tools/bin
export PATH=$PATH:$ANDROID_HOME/platform-tools
$ source $HOME/.zprofile
$ echo $ANDROID_HOME
$ sudo gem install cocoapods

Getting Started with Typescript

$ npx react-native init ReactNativeTutorial --template react-native-template-typescript
$ yarn start$ yarn ios  // or yarn android

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store