/todo-list

Primary LanguageTypeScript

Todo List Microfrontend

This repository contains a Todo List application built as a microfrontend using React, TypeScript, Vite, and Module Federation.

Prerequisites

  • Node.js
  • Yarn

Installation

  1. Clone the repository:
git clone https://github.com/guimap01/todo-list.git
cd todo-list
  1. Install dependencies for the microfrontend app:
cd todo-list-microfrontend
yarn install

Running the Applications

  1. Directly using the App
yarn dev
  1. 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 called useTodos which provides access to the following methods and values: todos, addTodo, toggleTodoCompletion, removeTodo, error