I did this project on a challenge from my TA. My task was to replicate the calculator on my computer (Mac), in style and performance.
I used ReactJS for components and to monitor state changes for each button click. The state captures the current clicks while also remember the last number. The state also holds the operator the user selected. Then the math is performed every time someone selects another operator or hits equals.
I'm also using React Components for the calculator's buttons, dynamically generating them from a JSON file.
I designed this to match the design of a Mac calculator, trying to eye it up so it looked the same.