Source Structure

Config Files

File locate: ./app/config/..

Components

File locate: ./app/components/..

Common components that could be used many times in your app: Button, Icon, Text, Filter Sort, Text, Start Rating …

Navigation

File locate: ./app/navigation/..

Templates

File locate: ./app/screens/..

Then navigation has defined in ./app/navigation/main.js will link with screens locate in folder ./app/screens/..

All template design of the app are locate in here. You could change or re-structure by matching with your own project structure design.

Assets

File locate: ./app/assets/..

You can store images or other file resource in this folder

Language

File locate: ./app/lang/..

The template also support react-native-i18n. So that all your language files should be put here. How to include and define your language files in the application ?

Open file ./app/index.js

import React, { Component } from "react";
import { store, persistor } from "app/store";
import { Provider } from "react-redux";
import { PersistGate } from "redux-persist/integration/react";
import I18n from "react-native-i18n";
import Content from "./content";

console.disableYellowBox = true;

export default class index extends Component {
    constructor(props) {
        super(props);
        // Define & Include your language files in here
        I18n.fallbacks = true;
        I18n.translations = {
            en: require("./lang/en.json"),
            ko: require("./lang/ko.json"),
            vi: require("./lang/vi.json")
        };
    }

    render() {
        return (
            <Provider store={store}>
                <PersistGate loading={null} persistor={persistor}>
                    <Content />
                </PersistGate>
            </Provider>
        );
    }
}

Redux

File locate:

Contain main action and reducers

With React Native template, we’re not focus much about redux, we just make sample authentication as temp for control simple login screen

Utils

File locate: ./app/utils/..

Commons function for use in the app will be put here, So if you develop or add more common functions, just add it here !