DEV Community

Cover image for Let's get started with React Native + Expo
ncutixavier
ncutixavier

Posted on

5

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

Image of Datadog

The Essential Toolkit for Front-end Developers

Take a user-centric approach to front-end monitoring that evolves alongside increasingly complex frameworks and single-page applications.

Get The Kit

Top comments (0)

Sentry image

See why 4M developers consider Sentry, “not bad.”

Fixing code doesn’t have to be the worst part of your day. Learn how Sentry can help.

Learn more

đź‘‹ Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay