Skip to content

Devoguzkaya/react-reducer-calculator

Repository files navigation

🧮 Sprint 10 – Reducer Calculator

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.

🎯 Learning Objectives

  • 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

⚙️ Application Overview

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

🧩 Technologies Used

  • React (with useReducer hook)
  • JavaScript (ES6+)
  • Vite (development environment)
  • CSS / Flexbox (for layout and styling)

💡 Key Takeaways

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.


Releases

No releases published

Packages

No packages published