otmanTR / math-magicians

**Math Magicians is a SPA which you coul make single calculations and reading a random math related queto *

Home Page:https://math-magicians-ylwa.onrender.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

event Branch Describing how I use fontional companents.

otmanTR opened this issue Β· comments

In this project, I used the useState hook.

'function Calculator() {
const [state, setState] = useState({ total: 0, next: null, operation: null });

const { total, next, operation } = state;

const calculateResult = (calculateButton) => {
setState((state) => calculate(state, calculateButton.target.textContent));
};'

In this function, the useState hook defined the objects of total, next, and operation as the initial values of the state. With this, I used these objects in my calculation function.

Hi @otmanTR,

Highlights!

  • Good explanation

Your project is complete! There is nothing else to say other than... it's time to merge it :shipit:
Congratulations! πŸŽ‰

Status: Approved βœ”οΈ

Cheers and Happy coding!πŸ‘πŸ‘πŸ‘

Optional suggestions

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.

Feel free to leave any questions or comments in the PR thread if something is not 100% clear.


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.