Hey, this article is a head start for this concept not an assignment, so that's why it is in open space, you're free to work on it and update the code & bugs as you want. Overall I like it as it gives me space to work and improve on it, not just copy and use further. I guess you're promoting "concept" although that is nice, but put your testing in a single comment as it demotivates the readers. :)
Top comments (8)
cool, but your code is not beautiful
1, bad switch case
2, bad button component creation process
see my version( powered by concent)
Completely separate UI and logic!
codesandbox.io/s/react-calculator-...
and I found a bug when I migrate your code
when I input
3*50
, the result is 750 !!!you can fix it on my codesandbox mentioned above or yours
the 3 * 50 becomes 750 bug is not fixed yet (as of Feb 20, 2021)
input
888-666
, the result is150
Hey thanx for doing the thorough testing of the app, Its really great of you for doing this. Will check the logic and update the needfull.
thank for your reply, if you have fixed it just let me know, I will copy it to my concent version.
another bug founded:
try input
5-6+1
, the result isStart Calculating
Hey, this article is a head start for this concept not an assignment, so that's why it is in open space, you're free to work on it and update the code & bugs as you want. Overall I like it as it gives me space to work and improve on it, not just copy and use further. I guess you're promoting "concept" although that is nice, but put your testing in a single comment as it demotivates the readers. :)
concent is a totally new state management for react, born for build large and high performance react app, hope you like it