This project was developed as part of the Workintech Frontend training program, focusing on the Reducer pattern in React.
The goal was to build a functional calculator that performs basic arithmetic operations using state management with the useReducer hook.
- Understand and apply the Reducer pattern in React
- Learn how to manage state with
useReducer - Implement action creators and reducer logic for dynamic updates
- Strengthen understanding of component structure and event handling
- Reinforce debugging and testing practices through iterative development
The calculator allows users to:
- Perform basic operations: addition, subtraction, and multiplication
- Change the active operator dynamically (
+,-,*) - Use memory functions:
- M+ → Store current total in memory
- MR → Recall value from memory
- MC → Clear memory
- Reset the display with CE
- View the real-time total in a clean and minimal UI
- React (with
useReducerhook) - JavaScript (ES6+)
- Vite (development environment)
- CSS / Flexbox (for layout and styling)
This project helped reinforce the core concepts of reducer-based state management.
By connecting UI components with actions and a centralized reducer, the application demonstrates how to build predictable, testable, and scalable state logic in React.