Take a look here: https://codesandbox.io/s/rw0j2orqmp
I think it could been done much simpler. yours looks great and I loved how it handled neg. numbers and did not use eval all a big plus. redux seems like over kill ,but it functions well. Here is mine if you want to see a super simple one. I did not use eval and kept it very simple. Nice job
https://reactcalfinal.herokuapp.com/ - project
https://github.com/joshuaaguilar20/ReactCalculator1/blob/master/src/app.js (actual app code)
Thanks for the feedback! I did actually use eval though in the METHODS and EQUALS switch case. I couldn’t find a suitable replacement to do the calculations. What’s a good alternative to that?
there are a couple. I found it a fun challenge to not use it as it was not needed (ex logic). There are a few for security, (npm safe-eval no pun intended), and a plugin called jexl- https://github.com/TomFrost/Jexl
Cool, I’ll give these a look!