Open shaaibu7 opened 1 year ago
Hi Student ,
-Used functional components ✔️
Good job implementing the requirements :+1: Your project is complete! There is nothing else to say other than... it's time to merge it :shipit: Congratulations! 🎉
Every comment with the [OPTIONAL] prefix is not crucial enough to stop the approval of this PR. However, I strongly recommend you to take them into account as they can make your code better. Cheers and Happy coding!👏👏👏
Feel free to leave any questions or comments in the PR thread if something is not 100% clear. Please, remember to tag ichala in your question so I can receive the notification.
As described in the Code reviews limits policy you have a limited number of reviews per project (check the exact number in your Dashboard). If you think that the code review was not fair, you can request a second opinion using this form.
Use hooks description
[ ] I used a functional component with the useState hook.
[ ] I initialized the use state hook with an initial value and a function that updates the value. https://github.com/shaaibu7/math-magicians/blob/63f16a6eeb3f82715443363b4ce4b0bbe4e0139b/src/components/Calculator.js#L5
[ ] I created a handleClick function that uses the calculate function I imported from the calculate.js file and passed it as an argument to the setResult function responsible for updating the value. https://github.com/shaaibu7/math-magicians/blob/63f16a6eeb3f82715443363b4ce4b0bbe4e0139b/src/components/Calculator.js#L11-L13
[ ] I implemented an event for each button and passed an event handler that calls the handleClick function. the handleClick function receives an argument that is the specific value of the button. https://github.com/shaaibu7/math-magicians/blob/63f16a6eeb3f82715443363b4ce4b0bbe4e0139b/src/components/Calculator.js#L20-L25
[ ] the result of the calculation is then displayed for the user to see using the updated value of the useState hook.