DEV Community

Discussion on: Clean Coding React - Props

Collapse
 
thekashey profile image
Anton Korzunov

Short posts keep more secretes and could leave a reader with even more confusion.

What's no brainer for you, might not be no brainer for everyone.

So this is it! This is why you cannot throw fully backed answers, but have to explain why they are correct, and display the incorrect solutions as well, so the reader would be able to "find" themselves in your story - like "I am doing it right", or "I am doing it wrong?"

Sometimes you have to have those proofs just to prove that your solution is correct. Prove to yourself, not only to the reader. Be able to answer Devil's advocate questions.
Here a few:

  • => vs function? There is a choice I could make, and what should I pick? Is there any difference?
  • or, in your example you've used =>, but as a result functions are variables, and could be typed as variables. React.FC or :Props? Is there any difference?