I made this with react and am now trying to reimplement it w/o using react. It is going pretty well so far but that is why it's not nearly as finished as I'd like it to be.
So far I've got a general outline. The styles are not so good at this point and will get a lot of my attention next and the functionality isn't there yet, but I was pretty excited to implement my own version of useState and useReducer.
Main JS file is the index.js file, calc.js is the previous project that I haven't implemented any part of yet. Extensions contains useState and useReducer and jsx_runtime has functions for parsing JSX and creating elements.
Using much of what you built-in Project 1, create a single page client side calculator application.
Requirements:
- The calculator can do addition, subtraction, multiplication, division
- Can handle decimals
- Can toggle between negative and positive numbers
- Can change a number to a percentage
- Can clear the current total
- When a user presses equal the sum displays. However, the total is held in memory for additional calculations A scrollable history of calculations will display on the app. The format for the display is:
24 = 24
+ 14 = 38
= = 38
------clear-------
- The application can toggle between light and dark theme. (The actual colors are up to you, you can use what is in the Figma file or do your own thing.)