A simple to-do application built with React, demonstrating the power of Context and Reducer for state management.
- Add new tasks
- Toggle completion status of tasks
- Delete tasks
- Edit existing tasks
- Centralized state for all to-do items, eliminating prop drilling and improving component reusability.
- Clear separation of concerns: Reducer defines pure state transitions, while context provides access to state and dispatch functions.
- Memoization ensures components only re-render when their state or dependencies change.
- Reducer state updates are predictable and efficient.
- Reducer logic is isolated and easy to test independently.
- Context provides a clear entry point for testing child components that consume state.
- Clone the repository.
- Install dependencies:
npm install
- Start the development server:
npm start
- Visit https://localhost:3000 in your browser.