Convert Figma logo to code with AI

thecodingmachine logoreact-native-boilerplate

A React Native template for building solid applications 🐙, using JavaScript 💛 or Typescript 💙 (you choose).

4,809
868
4,809
3

Top Related Projects

17,543

Infinite Red's battle-tested React Native project boilerplate, along with a CLI, component/model generators, and more!

👾 Clean and minimalist React Native template for a quick start with TypeScript.

🔥 A well-tested feature-rich modular Firebase implementation for React Native. Supports both iOS & Android platforms for all Firebase services.

A complete native navigation solution for React Native

Routing and navigation for your React Native apps

33,519

An open-source framework for making universal native apps with React. Expo runs on Android, iOS, and the web.

Quick Overview

The thecodingmachine/react-native-boilerplate is a comprehensive React Native boilerplate that provides a solid foundation for building mobile applications. It comes pre-configured with a variety of tools and libraries, making it easier for developers to kickstart their projects and focus on building the core functionality of their app.

Pros

  • Comprehensive Setup: The boilerplate includes a wide range of pre-configured tools and libraries, such as Redux, React Navigation, and Axios, which can save developers a significant amount of time and effort in setting up their project.
  • Opinionated Structure: The project follows a well-structured and opinionated file organization, which can help maintain code readability and maintainability as the project grows.
  • Extensive Documentation: The boilerplate comes with detailed documentation, covering everything from installation to project structure and common use cases, making it easier for new developers to get started.
  • Active Development: The project is actively maintained, with regular updates and bug fixes, ensuring that developers have access to the latest features and improvements.

Cons

  • Steep Learning Curve: The boilerplate includes a significant number of tools and libraries, which can make it challenging for new developers to understand and navigate the codebase, especially if they are not familiar with the underlying technologies.
  • Potential Overhead: The comprehensive setup provided by the boilerplate may introduce some overhead, which could impact the performance or size of the final application, especially for smaller projects.
  • Opinionated Approach: The boilerplate's opinionated structure and choice of tools may not align with the preferences or requirements of all developers, which could make it less suitable for certain projects or teams.
  • Potential Vendor Lock-in: By relying on a specific boilerplate, developers may become more dependent on the project's maintainers and the continued support of the underlying technologies, which could make it more difficult to migrate to a different setup in the future.

Code Examples

N/A (This is not a code library)

Getting Started

N/A (This is not a code library)

Competitor Comparisons

17,543

Infinite Red's battle-tested React Native project boilerplate, along with a CLI, component/model generators, and more!

Pros of Ignite

  • More comprehensive CLI tool for generating and managing React Native projects
  • Includes a wider range of pre-configured features and integrations
  • Offers a larger ecosystem of plugins and add-ons

Cons of Ignite

  • Steeper learning curve due to its more complex structure
  • May include unnecessary features for simpler projects
  • Less flexibility in terms of customization compared to a minimal boilerplate

Code Comparison

React Native Boilerplate:

import React from 'react'
import { Provider } from 'react-redux'
import { PersistGate } from 'redux-persist/lib/integration/react'
import { store, persistor } from '@/Store'
import ApplicationNavigator from '@/Navigators/Application'

Ignite:

import React from 'react'
import { AppNavigator } from './navigators'
import { RootStore, RootStoreProvider, setupRootStore } from './models'
import { ErrorBoundary } from './screens/ErrorScreen/ErrorBoundary'
import { initFonts } from './theme/fonts'

Both boilerplates provide a solid foundation for React Native projects, but Ignite offers a more feature-rich starting point with additional tools and integrations. React Native Boilerplate, on the other hand, provides a simpler, more lightweight structure that may be easier to customize for specific project needs. The code comparison shows that Ignite uses a custom store setup and error boundary, while React Native Boilerplate relies on Redux for state management.

👾 Clean and minimalist React Native template for a quick start with TypeScript.

Pros of react-native-template-typescript

  • Lightweight and minimal setup, focusing solely on TypeScript integration
  • Official template maintained by the React Native community, ensuring compatibility and regular updates
  • Easier to customize and build upon for specific project needs

Cons of react-native-template-typescript

  • Lacks pre-configured state management, navigation, and other common libraries
  • Requires more initial setup for complex projects
  • Doesn't include testing setup or CI/CD configurations out of the box

Code Comparison

react-native-template-typescript:

import React from 'react';
import { View, Text } from 'react-native';

const App = () => {
  return (
    <View>
      <Text>Hello, World!</Text>
    </View>
  );
};

react-native-boilerplate:

import React from 'react';
import { Provider } from 'react-redux';
import { PersistGate } from 'redux-persist/lib/integration/react';
import { store, persistor } from '@/store';
import ApplicationNavigator from '@/navigators/Application';

const App = () => (
  <Provider store={store}>
    <PersistGate loading={null} persistor={persistor}>
      <ApplicationNavigator />
    </PersistGate>
  </Provider>
);

The code comparison shows that react-native-template-typescript provides a basic TypeScript setup, while react-native-boilerplate includes additional features like Redux integration and navigation setup out of the box.

🔥 A well-tested feature-rich modular Firebase implementation for React Native. Supports both iOS & Android platforms for all Firebase services.

Pros of react-native-firebase

  • Specialized for Firebase integration, offering comprehensive Firebase services support
  • Regular updates and active community, ensuring compatibility with the latest Firebase features
  • Extensive documentation and examples for easy implementation

Cons of react-native-firebase

  • Limited to Firebase ecosystem, less flexible for other backend services
  • Potentially larger app size due to inclusion of Firebase SDK
  • Steeper learning curve for developers unfamiliar with Firebase

Code Comparison

react-native-firebase:

import auth from '@react-native-firebase/auth';

auth()
  .signInWithEmailAndPassword(email, password)
  .then(() => console.log('User signed in!'))
  .catch(error => console.error(error));

react-native-boilerplate:

import { login } from './authService';

login(email, password)
  .then(() => console.log('User logged in!'))
  .catch(error => console.error(error));

The react-native-firebase example shows direct integration with Firebase authentication, while react-native-boilerplate uses a more generic approach, allowing for flexibility in backend services.

react-native-boilerplate provides a more versatile starting point for React Native projects, offering a clean architecture and best practices. It's suitable for various backend integrations and custom implementations. On the other hand, react-native-firebase excels in Firebase-specific development, providing seamless integration with Firebase services but with less flexibility for other backends.

A complete native navigation solution for React Native

Pros of react-native-navigation

  • Native performance and smooth transitions between screens
  • Extensive customization options for navigation elements
  • Strong community support and regular updates

Cons of react-native-navigation

  • Steeper learning curve compared to simpler navigation solutions
  • Requires additional setup and configuration
  • May introduce complexity for smaller projects

Code Comparison

react-native-navigation:

Navigation.setRoot({
  root: {
    stack: {
      children: [
        { component: { name: 'Home' } }
      ]
    }
  }
});

react-native-boilerplate:

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>
  );
}

The react-native-navigation approach offers more control over the navigation stack and provides a more native feel, while react-native-boilerplate uses React Navigation, which is easier to set up but may have slightly less performance optimization for complex navigation scenarios.

Routing and navigation for your React Native apps

Pros of react-navigation

  • Focused solely on navigation, providing a comprehensive and flexible solution
  • Extensive documentation and community support
  • Regular updates and maintenance

Cons of react-navigation

  • Requires additional setup and configuration for a complete app structure
  • May need to integrate with other libraries for state management and styling

Code Comparison

react-navigation:

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.Screen name="Details" component={DetailsScreen} />
      </Stack.Navigator>
    </NavigationContainer>
  );
}

react-native-boilerplate:

import { RootNavigator } from './navigators'
import { NavigationContainer } from '@react-navigation/native'

function App() {
  return (
    <NavigationContainer>
      <RootNavigator />
    </NavigationContainer>
  )
}

react-native-boilerplate provides a more opinionated structure with pre-configured navigation, state management, and styling. It offers a complete project setup out of the box, which can be advantageous for quick starts but may require more effort to customize. react-navigation, on the other hand, focuses solely on navigation, allowing for more flexibility in overall project structure but requiring additional setup for a complete application.

33,519

An open-source framework for making universal native apps with React. Expo runs on Android, iOS, and the web.

Pros of Expo

  • Simplified development process with a managed workflow
  • Extensive library of pre-built components and APIs
  • Easier cross-platform development and deployment

Cons of Expo

  • Limited access to native modules and custom native code
  • Larger app size due to included Expo runtime
  • Potential performance overhead for complex applications

Code Comparison

react-native-boilerplate:

import React from 'react'
import { Provider } from 'react-redux'
import { PersistGate } from 'redux-persist/lib/integration/react'
import { store, persistor } from '@/Store'
import ApplicationNavigator from '@/Navigators/Application'
import './Translations'

Expo:

import React from 'react';
import { StyleSheet, Text, View } from 'react-native';

export default function App() {
  return (
    <View style={styles.container}>
      <Text>Open up App.js to start working on your app!</Text>
    </View>
  );
}

The react-native-boilerplate code shows a more complex setup with Redux integration, while the Expo example demonstrates a simpler, more straightforward approach to creating a basic React Native app. react-native-boilerplate provides a more structured and opinionated starting point, whereas Expo offers a more flexible and beginner-friendly environment for React Native development.

Convert Figma logo designs to code with AI

Visual Copilot

Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.

Try Visual Copilot

README

Logo

React Native Boilerplate License React Native Boilerplate Release Date React Native Boilerplate Download React Native Boilerplate Top Language CI

TheCodingMachine React Native boilerplate

This project is a React Native boilerplate that can be used to kickstart a mobile application.

The boilerplate provides an optimized architecture for building solid cross-platform mobile applications through separation of concerns between the UI and business logic. It is fully documented so that each piece of code that lands in your application can be understood and used.

If you love this boilerplate, give us a star, you will be a ray of sunshine in our lives :)

Requirements

Node 18 or greater is required. Development for iOS requires a Mac and Xcode 10 or up, and will target iOS 11 and up.

You also need to install the dependencies required by React Native.
Go to the React Native environment setup, then select React Native CLI Quickstart tab.
Follow instructions for your given development OS and target OS.

Quick start

To create a new project using the boilerplate simply run :

npx react-native@latest init MyApp --template @thecodingmachine/react-native-boilerplate

Assuming you have all the requirements installed, you can run the project by running:

  • yarn start to start the metro bundler, in a dedicated terminal
  • yarn <platform> to run the platform application (remember to start a simulator or connect a device)

Digging Deeper

To learn more about this boilerplate, go to full documentation

License

This project is released under the MIT License.

About us

TheCodingMachine is a web and mobile agency based in Paris and Lyon, France. We are constantly looking for new developers and team leaders and we love working with freelancers. You'll find an overview of all our open source projects on our website and on Github.