arthurvmdantas / tip-calculator

Frontend exercise
0 stars 0 forks source link

Refactor #2

Open violetadev opened 3 years ago

violetadev commented 3 years ago

You want to avoid manipulating the dom directly. Here is an explanation that might help you get a better grasp on what's happening on React: https://stackoverflow.com/a/56332824/9281003 (you can check more resources about this topic on the notion app) A good approach to fix this line of code, could be dynamic css classes: https://stackoverflow.com/questions/36209432/how-to-dynamically-add-a-class-to-manual-class-names

https://github.com/arthurvmdantas/tip-calculator/blob/94cf61f0991908fe4838283318df14a5f9d247a4/src/App.tsx#L43