This document provides an overview of a Todo app built with React Native using the Model-View-ViewModel (MVVM) architecture pattern and Redux for state management.
This Todo app is built with React Native, following the MVVM architecture pattern. It uses Redux for state management, ensuring a unidirectional data flow and a clear separation of concerns.
MVVM is an architectural pattern that facilitates the separation of the development of the graphical user interface (the view) from the development of the business logic or back-end logic (the model). This is achieved through the introduction of an intermediate component: the ViewModel.
Model represents the data and the business logic of the application. In this app, the Redux store acts as the model.
The UI layer, displaying data and routing user interactions to the ViewModel.
Handles the presentation logic and state for a particular view, providing data from the Model to the View and processing user input.
- HomeTodoScreen: Displays the list of todo items and a button to create new todos.
- NewTodoScreen: Provides an interface to create a new todo item.
- UpdateTodoScreen: Allows updating and deleting an existing todo item.
- useHomeTodoController: View controller for HomeTodoScreen.
- useNewTodoController: View controller for NewTodoScreen.
- useUpdateTodoController: View controller for UpdateTodoScreen.
- useTodoViewModel: ViewModel for todos.
- Redux Slice: Manages the todo items' state.
To install and run the app locally:
- Clone the repository:
git clone <repository-url>
cd <repository-folder>
- Install the dependencies:
npm install
To run the app on an emulator or a physical device:
npm run android
# or
npm run ios