Step 1: Install Node.js 20
Make sure you have at least Node.js version 20 installed. If not, use nvm
to get it. Run:
nvm install 20
To use it, run:
nvm use 20
Step 2: Install Expo CLI
If you don't have expo-cli
yet, install it globally with:
npm i -g expo-cli
Step 3: Create Your Project
For JavaScript:
Run:
npx create-expo-app my-project --template blank
Replace "my-project" with your project name.
For TypeScript:
Run:
npx create-expo-app my-project --template blank-typescript
Replace "my-project" with your project name.
Additional Setup for TypeScript:
a. Install TypeScript and necessary types:
npm install --save-dev typescript @types/react @types/react-native
b. To run on the web, install these packages:
npm install react-native-web@~0.19.10 react-dom@18.2.0 @expo/metro-runtime@~3.2.1
Conclusion 🎉
Now you're all set to create an awesome React native with Expo project, whether you prefer JavaScript or TypeScript. Follow the next article where we continue to set up Redux Toolkit and Axios. Happy coding! 🚀
Top comments (0)