create-expo-stack
CLI tool to initialize a React Native application with Expo. Provides options to include Typescript, file-based routing via Expo Router, configuration based routing via pure React Navigation, styling via Nativewind, Restyle, Unistyles, StyleSheets, or Tamagui, and/or backend as a service such as Firebase and Supabase.
Top Related Projects
The React Framework
A framework for building native applications using React
A powerful cross-platform UI toolkit for building native-quality iOS, Android, and Progressive Web Apps with HTML, CSS, and JavaScript.
Cross-Platform React Native UI Toolkit
A complete native navigation solution for React Native
Quick Overview
Create Expo Stack is a CLI tool designed to quickly set up a new Expo project with a variety of popular libraries and configurations. It streamlines the process of creating a new React Native project using Expo, allowing developers to choose from different tech stacks and configurations to jumpstart their mobile app development.
Pros
- Saves time by automating the setup process for Expo projects
- Offers a variety of popular tech stack options (e.g., TypeScript, JavaScript, Tailwind CSS, NativeWind)
- Includes integration with navigation libraries and state management solutions
- Provides a consistent and opinionated project structure
Cons
- May include unnecessary dependencies for simpler projects
- Limited customization options during initial setup
- Potential for conflicts with future updates of included libraries
- Learning curve for developers unfamiliar with the included tech stack options
Getting Started
To use Create Expo Stack, follow these steps:
# Install the CLI tool globally
npm install -g create-expo-stack
# Create a new project
npx create-expo-stack my-app
# Follow the prompts to select your desired configuration
# Navigate to the project directory
cd my-app
# Start the development server
npm start
After running these commands, you'll have a new Expo project set up with your chosen configuration, ready for development.
Competitor Comparisons
The React Framework
Pros of Next.js
- Robust server-side rendering and static site generation capabilities
- Extensive ecosystem and community support
- Seamless integration with Vercel's deployment platform
Cons of Next.js
- Steeper learning curve for developers new to React or server-side rendering
- Less flexibility for custom routing compared to pure React applications
- Potentially larger bundle sizes for simple applications
Code Comparison
Next.js:
import { useRouter } from 'next/router'
function ActiveLink({ children, href }) {
const router = useRouter()
const style = {
color: router.asPath === href ? 'red' : 'black',
}
return (
<a href={href} style={style}>
{children}
</a>
)
}
create-expo-stack:
import { Link } from 'expo-router'
function ActiveLink({ children, href }) {
return (
<Link href={href}>
{children}
</Link>
)
}
Key Differences
- Next.js provides more built-in features for web development, while create-expo-stack focuses on cross-platform mobile development
- create-expo-stack offers a simpler setup process for React Native projects
- Next.js has better performance optimizations for web applications, whereas create-expo-stack excels in mobile app development
Use Cases
- Choose Next.js for complex web applications with server-side rendering requirements
- Opt for create-expo-stack when developing cross-platform mobile apps or when simplicity in setup is a priority
A framework for building native applications using React
Pros of React Native
- Mature ecosystem with extensive documentation and community support
- Direct access to native APIs for advanced functionality
- Wider range of third-party libraries and components available
Cons of React Native
- Steeper learning curve, especially for developers new to mobile development
- More complex setup and configuration process
- Requires more frequent updates and maintenance due to rapid development
Code Comparison
React Native:
import React from 'react';
import { View, Text } from 'react-native';
const App = () => (
<View>
<Text>Hello, React Native!</Text>
</View>
);
Create Expo Stack:
import { View, Text } from 'react-native';
export default function App() {
return (
<View>
<Text>Hello, Expo!</Text>
</View>
);
}
While both repositories aim to facilitate React Native development, React Native provides a more comprehensive and flexible framework for building mobile applications. Create Expo Stack, on the other hand, offers a simpler and more streamlined approach, particularly suitable for beginners or rapid prototyping. The code comparison shows that both use similar syntax, with Create Expo Stack leveraging Expo's simplified structure for quicker setup and development.
A powerful cross-platform UI toolkit for building native-quality iOS, Android, and Progressive Web Apps with HTML, CSS, and JavaScript.
Pros of Ionic Framework
- Mature and well-established framework with a large community and extensive documentation
- Supports multiple platforms (iOS, Android, web) with a single codebase
- Offers a rich set of pre-built UI components and native device features
Cons of Ionic Framework
- Steeper learning curve, especially for developers new to Angular or web technologies
- Performance can be slower compared to native apps, particularly for complex applications
- Larger app size due to the inclusion of the entire framework
Code Comparison
Ionic Framework:
import { Component } from '@angular/core';
import { IonicModule } from '@ionic/angular';
@Component({
selector: 'app-home',
template: '<ion-content>Hello Ionic!</ion-content>',
standalone: true,
imports: [IonicModule],
})
export class HomePage {}
Create Expo Stack:
import React from 'react';
import { View, Text } from 'react-native';
export default function Home() {
return (
<View>
<Text>Hello Expo!</Text>
</View>
);
}
The Ionic Framework example showcases its Angular integration and use of built-in components, while Create Expo Stack demonstrates a simpler React Native approach with standard components.
Cross-Platform React Native UI Toolkit
Pros of React Native Elements
- Comprehensive UI toolkit with a wide range of pre-built components
- Well-established and maintained library with a large community
- Customizable themes and styles for consistent app design
Cons of React Native Elements
- Larger bundle size due to the extensive component library
- May require additional configuration for certain components
- Less flexibility in project structure compared to Create Expo Stack
Code Comparison
React Native Elements:
import { Button } from 'react-native-elements';
<Button
title="Click me"
buttonStyle={{ backgroundColor: 'blue' }}
onPress={() => console.log('Button pressed')}
/>
Create Expo Stack:
import { Button } from 'react-native';
<Button
title="Click me"
color="blue"
onPress={() => console.log('Button pressed')}
/>
React Native Elements provides more customization options out of the box, while Create Expo Stack uses native components with simpler props. Create Expo Stack focuses on project setup and structure, whereas React Native Elements is primarily a UI component library.
A complete native navigation solution for React Native
Pros of react-native-navigation
- Native performance and smoother transitions
- More control over the navigation stack and animations
- Better support for complex navigation patterns
Cons of react-native-navigation
- Steeper learning curve and more complex setup
- Less compatibility with Expo ecosystem
- Requires ejecting from Expo managed workflow
Code Comparison
create-expo-stack:
import { NavigationContainer } from '@react-navigation/native';
import { createStackNavigator } from '@react-navigation/stack';
const Stack = createStackNavigator();
function App() {
return (
<NavigationContainer>
<Stack.Navigator>
<Stack.Screen name="Home" component={HomeScreen} />
</Stack.Navigator>
</NavigationContainer>
);
}
react-native-navigation:
import { Navigation } from 'react-native-navigation';
Navigation.registerComponent('Home', () => HomeScreen);
Navigation.events().registerAppLaunchedListener(() => {
Navigation.setRoot({
root: {
stack: {
children: [{ component: { name: 'Home' } }]
}
}
});
});
create-expo-stack is a project template generator that sets up a React Native project with Expo and various tools, while react-native-navigation is a navigation library for React Native. create-expo-stack uses React Navigation by default, which is easier to set up and integrate with Expo projects. react-native-navigation offers more native performance but requires additional setup and is less compatible with Expo's managed workflow.
Convert designs to code with AI
Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.
Try Visual CopilotREADME
Create Expo Stack CLI
An interactive CLI to create a highly configurable, typesafe Expo app.
Get started by running npx create-expo-stack@latest
ð Over 50k Expo projects generated using CES! ð
Sponsors
Support this project by becoming a sponsor. Your logo will show up here with a link to your website.
Past Sponsors
Description
This CLI tool is designed to help you get started with React Native and Expo as quickly as possible. The CLI options allow you to configure your project with Typescript, file-based routing with Expo Router, configuration-based navigation via React-Navigation, styling with NativeWind, Restyle, StyleSheets, or Tamagui and authentication via Supabase or Firebase.
You can also use flags such as --noInstall
, --noGit
, and --default
in order to customize your project. The CLI will attempt to automatically determine your package manager of choice but you can also pass in your preferred package manager via --npm
, --yarn
, --pnpm
, or --bun
. Roadmap coming soon...
Usage
To get started, use npx to run the CLI tool. You will be prompted to opt into the features you want to use.
npx create-expo-stack@latest
Tech Stack for the templates
Currently, all of the templates use the same versions of the following libraries. Not all of the templates include all of the libraries, but they are all available for use.
Each project is generated based on the results of the CLI, on a per-file basis. This approach makes this CLI extremely extendable and easy to use. Common files to all generated projects are stored in the base template folder while files pertaining to additional packages are stored in the packages template folder. Beyond adding files, this project makes use of EJS in order to manipulate existing files as necessary.
Library | Category | Version | Description |
---|---|---|---|
React Native | Mobile Framework | v0.73 | The best cross-platform mobile framework |
React | UI Framework | v18 | The most popular UI framework in the world |
TypeScript | Language | v5 | Static typechecking |
React Navigation | Navigation | v6 | Performant and consistent navigation framework |
Expo | SDK | v51 | Allows (optional) Expo modules |
Expo Font | Custom Fonts | v11 | Import custom fonts |
Expo Linking | URL Handling | v5 | Open your app via a URL |
Expo Router | Navigation | v3 | File-based routing in React-Native |
Expo Splash Screen | Splash Screen | v0.18 | Custom splash screen |
Expo Status Bar | Status Bar Library | v1 | Status bar support |
Expo System UI | System UI Library | v2 | System UI support |
Expo Web Browser | Web Browser Library | v12 | Open links in the browser |
NativeWind | UI Framework | v4.1 | Tailwind CSS for React Native |
Restyle | UI Framework | v2 | Theme-based styling library for React Native |
Tamagui | UI Framework | v1 | Universal UI with a smart optimizing compiler |
Unistyles | UI Framework | v2 | Superset of StyleSheet |
Safe Area Context | Safe Area Library | v4 | Safe area support |
React Native Web | Web Support | v0.19 | React Native for Web |
Firebase | Backend and Auth | v10 | Cloud-hosted NoSQL database from Google |
Supabase | Backend and Auth | v2 | Open source Firebase alternative |
Reporting Bugs & Feedback
If you run into problems or have feedback, first search the issues and discussions in this repository. If you don't find anything, feel free to message me on Twitter or open a new issue.
Contributing
See this guide.
Contributions are welcome! Please open a pull request or an issue if you would like to contribute. There are existing feature requests labeled as [FR]
in the issues section of this repo.
Want to move faster? I can help ð
Getting up-to-speed on a new framework can be cumbersome. If you find that you need to move more quickly, I may be available to help.
If you'd like help with your React Native/Expo app or are just looking for a technical advisor to guide you along your journey, let's chat.
Contributors â¨
Thanks go to these wonderful people:
Top Related Projects
The React Framework
A framework for building native applications using React
A powerful cross-platform UI toolkit for building native-quality iOS, Android, and Progressive Web Apps with HTML, CSS, and JavaScript.
Cross-Platform React Native UI Toolkit
A complete native navigation solution for React Native
Convert designs to code with AI
Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.
Try Visual Copilot