Skip to content

phuongpt/react-hybrid-clean-architecture

Repository files navigation

Test CI

high-level-diagram

React Clean Architecture

One of the advantages that particularly stands out to me is the ability to isolate business rules from framework-specific details. This means that your core logic is not tied to any specific technology, such as React, React Native. As a result, you have greater flexibility to move certain parts of your application to a backend, switch out libraries with minimal hassle, and reuse tests as many times as you need. Additionally, you can even share code between React and React Native applications.

Screenshot

Web app Native app

Folder Structure

./frontend
├── core
│   └── package.json
│   └── lib
│       ├── adapters
│       ├── entities
│       ├── services
│       ├── useCases
│       └── features
├── native
│   └── package.json
│   └── src
│       ├── assets
│       ├── components
│           └── login
│                   └── index
│                   └── styles
│           └── register
│                   └── index
│                   └── styles
└── web
    └── package.json
    └── src
        ├── assets
        ├── components
            └── login
                    └── index
                    └── styles
            └── register
                    └── index
                    └── styles

Sharing codes

Web App Native App
Entities
Validation
User-cases
Repository
Service
State
Actions
Navigation
Component
Style

Running the apps

run yarn install under the project you'd like to run, and then run yarn start