Calculator challenge with React

Hello,
Time ago I did the calculator challenge in plain javascript, for what I sweated a lot.
Now I have done the same challenge with Reactjs more quickly. It has been a good exercice of React and at the same time some flex of problem-solving skills.

Calculator
React Code

1 Like

One thing I would look at is what happens when the user wants to do multiple calculations. For example 2 + 2 + 2 + 2. It looks like you have prevented this because you don’t want the user to try and calculate 2 +++++. This makes sense but a calculator without the possibility to do multiple calculations is pretty limited. Also you are preventing someone doing something like 2 + 8 = then * 2. Yours is a single use calculator, which is a shame really.