Skip to main content

What's in the box❓

This project is a React Native boilerplate that can be used to kick-start a mobile application.

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

Don't forget !!

If you love this boilerplate, give us a star, you will be a ray of sunshine in our lives 🌈 ☀️

Architecture 🧱

The driving goal of the architecture of the boilerplate is separation of concerns and using React Native at its best.

  • Using modern Javascript So many javascript features are indispensable now like hooks, functional component and really cool dependencies.

  • Presentational components are separated from containers.

    Presentational components are small components that are concerned with how things look. Containers usually define whole application screens and are concerned with how things work: they include presentational components and wire everything together.

    If you are interested you can read more about it here.

  • State is managed using global Redux stores.

    When applications grow, sharing state and its changes can become very hard. Questions like "How can I access this data?" or "When did this change?" are common, just like passing data around components just to be able to use it in nested components.

    With Redux, state is shared using global stores, and changes are predictable: actions are applied by reducers to the state. While the pattern can be a bit much for small projects, the clear separation of responsibilities and predictability helps with bigger applications.

    If you are interested you can read more about it here.

Content 🧳

The boilerplate contains:

The boilerplate includes an example (displaying fake user data) from UI components to the business logic. The example is easy to remove so that it doesn't get in the way.

Directory layout 🗂️

  • src/Assets: assets (image, audio files, ...) used by the application
  • src/Components: presentational components
  • src/Config: configuration of the application
  • src/Containers: container components, i.e. the application's screens
  • src/Navigators: react navigation navigators
  • src/Services: application services, e.g. API clients
  • src/Stores: redux actions, reducers and stores
  • src/Translations: application strings, you can add languages files and be able to translate your app strings
  • src/Theme: base styles for the application

Updates 🕐

The boilerplate will follow new React-Native releases as soon as libraries and tools used here are compatible.