https://github.com/dbish6/react_calculator_app
A React calculator app. This showcases two versions of the calculator, one using the useReducer hook and the other just using useState.
https://github.com/dbish6/react_calculator_app
css javascript react reactjs usereducer usestate
Last synced: 11 months ago
JSON representation
A React calculator app. This showcases two versions of the calculator, one using the useReducer hook and the other just using useState.
- Host: GitHub
- URL: https://github.com/dbish6/react_calculator_app
- Owner: dBish6
- Archived: true
- Created: 2023-01-05T19:10:12.000Z (about 3 years ago)
- Default Branch: master
- Last Pushed: 2023-12-02T22:53:31.000Z (about 2 years ago)
- Last Synced: 2025-01-26T18:46:13.711Z (12 months ago)
- Topics: css, javascript, react, reactjs, usereducer, usestate
- Language: JavaScript
- Homepage: https://dbish6.github.io/React_Calculator_App/
- Size: 859 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# React_Calculator_App
This repository contains two versions of a simple calculator app built with ReactJS: `react_calculator_reducer` and `react_calculator_states`.
## react_calculator_reducer
This version of the calculator app uses the `useReducer` hook from React to manage the state of the application. By using a reducer function to handle state updates based on different actions, this approach can make it easier to manage many state changes.
## react_calculator_states
This version of the calculator app uses the `useState` hook from React to manage the state of the application. While this approach can work well for simpler applications, the react_calculator_states version was not fully finished because I found that useReducer was a more appropriate tool for handling multiple actions and complex state changes.
_This calculator app is also featured on my portfolio; [davidbishop.info](https://www.davidbishop.info)._