Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found

Submitted

Tip-Calculator Using Reactjs and CUBE CSS

#react#cube-css
Suleman 750

@legion40216

Desktop design screenshot for the Tip calculator app coding challenge

This is a solution for...

  • HTML
  • CSS
  • JS
2junior
View challenge

Design comparison


SolutionDesign

Solution retrospective


Hi everyone this is my first react app, Any feedback or best practices very welcomed.

Community feedback

Maksim 590

@MaxTarasevich

Posted

Hi Suleman!

You are done a great work!

But I think your application needs some optimization!

In your App component you have 9 states!I think it a lot for small app like this!

It is very easy to get confused and lose data among so many states, try to minimize it, for example, the state can be represented as an object!

Optimization will help you find the reason why the reset button does not reset the state to default values as expected.

I hope my feedback helps you!

Write if you again come to a standstill, I will try to help in more detail!

Marked as helpful

1

Suleman 750

@legion40216

Posted

@MaxTarasevich Thank you bro, I did manage to solve the issue by understanding react controlled components. Essentially i had to use a callback to check which radio button has been pressed and change the react State accordingly.

0

Please log in to post a comment

Log in with GitHub
Discord logo

Join our Discord community

Join thousands of Frontend Mentor community members taking the challenges, sharing resources, helping each other, and chatting about all things front-end!

Join our Discord