Convert Figma logo to code with AI

flatlogic logoreact-native-starter

🚀A powerful react native starter template that bootstraps development of your mobile application

2,204
713
2,204
50

Top Related Projects

React Native starter kit with over 40 screens and modern Light and Dark theme for creating stunning cross-platform mobile applications.

17,543

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

An example app with all the UI components of NativeBase

Demo app for React Native Elements (w/ React Native Web)

A complete native navigation solution for React Native

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

Quick Overview

The flatlogic/react-native-starter is a boilerplate project for building React Native applications. It provides a pre-configured setup with various features and libraries to kickstart the development process.

Pros

  • Comprehensive Setup: The project comes with a well-structured codebase, including common components, screens, and navigation setup, making it easier to start building your app.
  • Integrated Libraries: It includes popular libraries like Redux, React Navigation, and Axios, saving you the time of setting them up from scratch.
  • Authentication and Authorization: The project provides a pre-built authentication flow, including sign-in, sign-up, and password reset functionality.
  • Theming and Styling: The project includes a theme system, allowing you to easily customize the app's appearance and styling.

Cons

  • Opinionated Structure: The project's structure and organization may not align with everyone's preferences, requiring some refactoring to fit specific needs.
  • Outdated Dependencies: Some of the dependencies used in the project may be outdated, requiring manual updates to keep up with the latest versions.
  • Limited Documentation: The project's documentation could be more comprehensive, making it challenging for new contributors to understand the codebase and contribute effectively.
  • Potential Performance Issues: The inclusion of multiple libraries and features may result in a larger app size and potential performance issues, which may need to be optimized.

Code Examples

1. Setting up Redux

// src/store/index.js
import { createStore, applyMiddleware } from 'redux';
import thunk from 'redux-thunk';
import rootReducer from './reducers';

const store = createStore(rootReducer, applyMiddleware(thunk));

export default store;

This code sets up the Redux store, including the root reducer and the thunk middleware for handling asynchronous actions.

2. Implementing Navigation

// src/navigation/AppNavigator.js
import React from 'react';
import { NavigationContainer } from '@react-navigation/native';
import { createStackNavigator } from '@react-navigation/stack';

import LoginScreen from '../screens/LoginScreen';
import HomeScreen from '../screens/HomeScreen';

const Stack = createStackNavigator();

const AppNavigator = () => {
  return (
    <NavigationContainer>
      <Stack.Navigator>
        <Stack.Screen name="Login" component={LoginScreen} />
        <Stack.Screen name="Home" component={HomeScreen} />
      </Stack.Navigator>
    </NavigationContainer>
  );
};

export default AppNavigator;

This code sets up the app's navigation using React Navigation's stack navigator, defining the login and home screens.

3. Handling Authentication

// src/screens/LoginScreen.js
import React, { useState } from 'react';
import { View, TextInput, Button } from 'react-native';
import { useDispatch } from 'react-redux';
import { login } from '../store/actions/authActions';

const LoginScreen = ({ navigation }) => {
  const [email, setEmail] = useState('');
  const [password, setPassword] = useState('');
  const dispatch = useDispatch();

  const handleLogin = () => {
    dispatch(login(email, password))
      .then(() => navigation.navigate('Home'))
      .catch((error) => console.error(error));
  };

  return (
    <View>
      <TextInput
        value={email}
        onChangeText={setEmail}
        placeholder="Email"
      />
      <TextInput
        value={password}
        onChangeText={setPassword}
        placeholder="Password"
        secureTextEntry
      />
      <Button title="Login" onPress={handleLogin} />
    </View>
  );
};

export default LoginScreen;

This code implements the login screen, including the form fields and the login functionality using the login action from the authentication Redux actions.

Getting Started

To get started with the flatlogic/react-native-starter project, follow these steps:

  1. Clone the repository:

    git clone https://github.com/flatlogic/react-native-starter.git
    

Competitor Comparisons

React Native starter kit with over 40 screens and modern Light and Dark theme for creating stunning cross-platform mobile applications.

Pros of KittenTricks

  • Comprehensive UI Components: KittenTricks provides a wide range of pre-built UI components, including screens, layouts, and UI elements, which can save significant development time.
  • Consistent Design: The project follows a consistent design language, ensuring a cohesive user experience across the application.
  • Detailed Documentation: The project's documentation is well-written and comprehensive, making it easier for developers to understand and use the provided features.

Cons of KittenTricks

  • Larger Codebase: KittenTricks has a larger codebase compared to React Native Starter, which may make it more challenging to customize and maintain.
  • Potential Overhead: The extensive set of features and components provided by KittenTricks may introduce additional overhead and complexity, which may not be necessary for all projects.
  • Limited Flexibility: The opinionated nature of KittenTricks may limit the flexibility for developers who prefer a more customized approach.

Code Comparison

Here's a brief code comparison between the two projects:

React Native Starter (flatlogic/react-native-starter):

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

const HomeScreen = () => {
  return (
    <View style={styles.container}>
      <Text style={styles.title}>Welcome to React Native Starter</Text>
    </View>
  );
};

const styles = StyleSheet.create({
  container: {
    flex: 1,
    justifyContent: 'center',
    alignItems: 'center',
  },
  title: {
    fontSize: 24,
    fontWeight: 'bold',
  },
});

export default HomeScreen;

KittenTricks (akveo/kittenTricks):

import React from 'react';
import { StyleSheet, View, Text } from 'react-native';
import { RkButton, RkStyleSheet } from 'react-native-ui-kitten';

const HomeScreen = () => {
  return (
    <View style={styles.container}>
      <Text style={styles.title}>Welcome to KittenTricks</Text>
      <RkButton rkType="primary">Get Started</RkButton>
    </View>
  );
};

const styles = RkStyleSheet.create(theme => ({
  container: {
    flex: 1,
    justifyContent: 'center',
    alignItems: 'center',
  },
  title: {
    fontSize: 24,
    fontWeight: 'bold',
    marginBottom: 16,
  },
}));

export default HomeScreen;
17,543

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

Pros of Ignite

  • Ignite provides a more comprehensive set of features and tools out of the box, including a CLI, boilerplate code, and a variety of plugins.
  • Ignite has a larger and more active community, with more resources and support available.
  • Ignite is designed to be more scalable and maintainable, with a focus on best practices and architectural patterns.

Cons of Ignite

  • Ignite has a steeper learning curve, as it requires understanding a larger codebase and ecosystem.
  • Ignite may be overkill for smaller projects or those with more specific requirements.
  • Ignite's opinionated nature may not align with the preferences of all developers.

Code Comparison

React Native Starter:

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

const styles = StyleSheet.create({
  container: {
    flex: 1,
    backgroundColor: '#fff',
    alignItems: 'center',
    justifyContent: 'center',
  },
});

Ignite:

import React from 'react'
import { StyleSheet, View } from 'react-native'
import { Provider } from 'react-redux'
import RootScreen from './app/screens/RootScreen'
import createStore from './app/store/createStore'

const store = createStore()

export default function App() {
  return (
    <Provider store={store}>
      <View style={styles.container}>
        <RootScreen />
      </View>
    </Provider>
  )
}

const styles = StyleSheet.create({
  container: {
    flex: 1
  }
})

An example app with all the UI components of NativeBase

Pros of NativeBase-KitchenSink

  • Provides a comprehensive set of pre-built UI components and utilities, making it easier to build complex user interfaces.
  • Includes a wide range of examples and demonstrations, which can be helpful for learning and understanding the capabilities of NativeBase.
  • Supports both iOS and Android platforms, allowing for cross-platform development.

Cons of NativeBase-KitchenSink

  • The project may be more complex and feature-rich than what is required for a simple React Native application, potentially adding unnecessary overhead.
  • The project may be less flexible and customizable compared to a more lightweight starter kit like React Native Starter.
  • The project may have a steeper learning curve, as it requires understanding the NativeBase library and its conventions.

Code Comparison

React Native Starter (flatlogic/react-native-starter):

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

const styles = StyleSheet.create({
  container: {
    flex: 1,
    backgroundColor: '#fff',
    alignItems: 'center',
    justifyContent: 'center',
  },
});

NativeBase-KitchenSink (GeekyAnts/NativeBase-KitchenSink):

import React from 'react';
import { Container, Header, Title, Content, Footer, FooterTab, Button, Left, Right, Body, Icon, Text } from 'native-base';

export default function App() {
  return (
    <Container>
      <Header>
        <Left>
          <Button transparent>
            <Icon name="menu" />
          </Button>
        </Left>
        <Body>
          <Title>Header</Title>
        </Body>
        <Right />
      </Header>
    </Container>
  );
}

Demo app for React Native Elements (w/ React Native Web)

Pros of react-native-elements/react-native-elements-app

  • Provides a comprehensive set of pre-built UI components, making it easier to build consistent and visually appealing React Native applications.
  • Includes a well-documented and actively maintained app example, which can serve as a reference for developers.
  • Offers a wide range of customization options for the UI components, allowing developers to tailor the app to their specific needs.

Cons of react-native-elements/react-native-elements-app

  • The app example may be more complex and feature-rich than what some developers need, potentially adding unnecessary complexity to their projects.
  • The library's focus on UI components may not be suitable for projects that require more complex or custom functionality beyond the provided components.
  • The learning curve for the library may be steeper compared to a more minimal starter kit like flatlogic/react-native-starter.

Code Comparison

flatlogic/react-native-starter

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

const styles = StyleSheet.create({
  container: {
    flex: 1,
    backgroundColor: '#fff',
    alignItems: 'center',
    justifyContent: 'center',
  },
});

react-native-elements/react-native-elements-app

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

export default function App() {
  return (
    <View style={styles.container}>
      <Text h1>Welcome to React Native Elements</Text>
      <Button title="Get Started" />
    </View>
  );
}

const styles = StyleSheet.create({
  container: {
    flex: 1,
    backgroundColor: '#fff',
    alignItems: 'center',
    justifyContent: 'center',
  },
});

A complete native navigation solution for React Native

Pros of wix/react-native-navigation

  • Robust Navigation System: wix/react-native-navigation provides a comprehensive and highly customizable navigation system for React Native apps, with support for features like deep linking, modal presentations, and tab-based navigation.
  • Performance Optimization: The library is designed for performance, with features like lazy-loading and native navigation transitions, which can improve the overall responsiveness of your app.
  • Cross-Platform Consistency: wix/react-native-navigation aims to provide a consistent navigation experience across both iOS and Android platforms, reducing the need for platform-specific code.

Cons of wix/react-native-navigation

  • Steep Learning Curve: The library has a more complex API compared to the built-in React Native navigation, which may require more time and effort to learn and integrate into your project.
  • Larger Codebase: wix/react-native-navigation has a larger codebase and dependencies compared to the built-in React Native navigation, which may increase the overall size of your app.
  • Limited Community Support: While wix/react-native-navigation has a significant user base, it may not have the same level of community support and resources as the built-in React Native navigation.

Code Comparison

Here's a brief code comparison between wix/react-native-navigation and flatlogic/react-native-starter:

wix/react-native-navigation (Navigation Setup):

import { Navigation } from 'react-native-navigation';

Navigation.registerComponent('HomeScreen', () => HomeScreen);
Navigation.setRoot({
  root: {
    stack: {
      children: [
        {
          component: {
            name: 'HomeScreen',
          },
        },
      ],
    },
  },
});

flatlogic/react-native-starter (Navigation Setup):

import { NavigationContainer } from '@react-navigation/native';
import { createStackNavigator } from '@react-navigation/stack';

const Stack = createStackNavigator();

const App = () => (
  <NavigationContainer>
    <Stack.Navigator>
      <Stack.Screen name="Home" component={HomeScreen} />
    </Stack.Navigator>
  </NavigationContainer>
);

🔥 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

  • Comprehensive Firebase integration: react-native-firebase provides a complete set of Firebase services, including Authentication, Firestore, Cloud Functions, and more, making it a one-stop solution for building Firebase-powered React Native apps.
  • Cross-platform support: The library is designed to work seamlessly across both iOS and Android platforms, simplifying the development process.
  • Active community and documentation: react-native-firebase has a large and active community, with extensive documentation and resources available to help developers get started and troubleshoot issues.

Cons of react-native-firebase

  • Complexity: The comprehensive nature of the library can make it more complex to set up and configure, especially for developers new to Firebase or React Native.
  • Performance overhead: Integrating the full suite of Firebase services may result in a larger application size and potential performance overhead, which could be a concern for some projects.

Code Comparison

React Native Starter (flatlogic/react-native-starter):

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

const HomeScreen = () => {
  return (
    <View style={styles.container}>
      <Text style={styles.title}>Welcome to React Native Starter</Text>
      <TouchableOpacity style={styles.button}>
        <Text style={styles.buttonText}>Get Started</Text>
      </TouchableOpacity>
    </View>
  );
};

const styles = StyleSheet.create({
  // ...
});

react-native-firebase (invertase/react-native-firebase):

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

// Initialize Firebase
const firebaseConfig = {
  // Your Firebase configuration
};

firebase.initializeApp(firebaseConfig);

// Sign in with email and password
auth()
  .signInWithEmailAndPassword('jane.doe@example.com', 'SuperSecretPassword!')
  .then(() => {
    console.log('User account signed in!');
  })
  .catch(error => {
    if (error.code === 'auth/email-already-in-use') {
      console.log('That email address is already in use!');
    }

    if (error.code === 'auth/invalid-email') {
      console.log('That email address is invalid!');
    }

    console.error(error);
  });

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

React Native Starter 🚀

View Demo | Download | More templates | Support forum

You're viewing the new and updated version of React Native Starter, previous version can be found under the v1 branch

A powerful React Native starter template that bootstraps the development of your mobile application, handy for business software projects.React Native Starter is a mobile application template with lots of built-in components like sidebar, navigation, form elements, etc - all you need to start building your mobile app faster.

React Native Starter

Get it on Google Play Download on App Store

What's inside

  • Always up-to-date React Native scaffolding
  • UI/UX Design from industry experts
  • Modular and well-documented structure for application code
  • Redux for state management
  • React Navigation for simple navigation
  • Disk-persisted application state caching
  • More than 16 Ready-to-use Pages

Getting Started

1. Clone and Install

# Clone the repo
git clone https://github.com/flatlogic/react-native-starter.git

# Navigate to clonned folder and Install dependencies
cd react-native-starter && yarn install

# Install Pods
cd ios && pod install

2. Open RNS in your iOS simulator

Run this command to start the development server and to start your app on iOS simulator:

yarn run:ios

Or, if you prefer Android:

yarn run:android

That's it! Cool, right?

Documentation

Our handy documentation can be found on official RNS website: https://docs.reactnativestarter.com

Contributing

If you find any problems, please open an issue or submit a fix as a pull request.

Want more?

We have a premium version of this mobile application template that saves you even more time and money and comes with advanced features:

  • Premium RED color scheme
  • More than 5 additional screens (such as chat, profile, product item, etc.)
  • Contains an extended charting library to visualize all the data you need
  • Premium support and updates included
  • Much, much more..

Read more and purchase it at https://reactnativestarter.com

Support

For any additional information please go to our support forum and raise your questions or feedback provide there. We highly appreciate your participation!

How can I support developers?

More from Flatlogic

License

Mozilla Public License 2.0