This repository contains a Todo List application built as a microfrontend using React, TypeScript, Vite, and Module Federation.
- Node.js
- Yarn
- Clone the repository:
git clone https://github.com/guimap01/todo-list.git
cd todo-list
- Install dependencies for the microfrontend app:
cd todo-list-microfrontend
yarn install
- Directly using the App
yarn dev
- Consuming MFE To consume the app as a MFE you will need to first build
yarn build
then run the preview script
yarn preview
The App can be consumed in the followind URL:
http://localhost:3000/assets/remoteEntry.js
This App will export two Component
- Todo - The
Todo
component - TodoProvider - The
TodoProvider
component handles all the functionality of the Todo app and exposes a hook calleduseTodos
which provides access to the following methods and values:todos
,addTodo
,toggleTodoCompletion
,removeTodo
,error