How stevenjm10/class-activity-2 works
This is a React calculator app. The browser-mounted application routes / to the calculator, where users enter numbers and operations, chain calculations, and see results or a division-by-zero error. Calculator state and button handling live alongside the arithmetic and rounding helpers in one source file; these are separated below to clarify their responsibilities. The README also identifies reset and delete controls. The source excerpts show the routing and calculation calls; styling is connected through the entry module's import.
Main entry points: Calculator.jsx Calculator interface · main.jsx React bootstrap · App.jsx Route selection · index.css Global styles
Components 6
Application shell
- React bootstrap
src/main.jsx - Route selection
src/App.jsx - Global styles
src/index.css
Calculator
- Calculator interface
src/pages/Calculator.jsx - Arithmetic helpers
src/pages/Calculator.jsx
Other components
- User
Connections 5
- React bootstrap → Route selection: renders
src/main.jsx - React bootstrap → Global styles: imports styles
src/main.jsx - Route selection → Calculator interface: routes to
src/App.jsx - User → Calculator interface: presses controls
src/pages/Calculator.jsx - Calculator interface → Arithmetic helpers: calls calculations
src/pages/Calculator.jsx