Let's get started with React Native + Expo

ncutixavier

ncutixavier

Posted on July 20, 2024

Let's get started with React Native + Expo

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
Enter fullscreen mode Exit fullscreen mode

To use it, run:

nvm use 20
Enter fullscreen mode Exit fullscreen mode

Step 2: Install Expo CLI

If you don't have expo-cli yet, install it globally with:

npm i -g expo-cli
Enter fullscreen mode Exit fullscreen mode

Step 3: Create Your Project

For JavaScript:

Run:

npx create-expo-app my-project --template blank
Enter fullscreen mode Exit fullscreen mode

Replace "my-project" with your project name.

For TypeScript:

Run:

npx create-expo-app my-project --template blank-typescript
Enter fullscreen mode Exit fullscreen mode

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
Enter fullscreen mode Exit fullscreen mode

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
Enter fullscreen mode Exit fullscreen mode

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! 🚀

💖 💪 🙅 🚩
ncutixavier
ncutixavier

Posted on July 20, 2024

Join Our Newsletter. No Spam, Only the good stuff.

Sign up to receive the latest update from our blog.

Related