DEV Community

Discussion on: React... Why so complicated...?

Collapse
 
joetex profile image
Joel Ruiz • Edited

This just in, a new business requirement! Add users name entered from another component. And based on their role, they increment by 2.

Your setup is cleaner though!

Collapse
 
cullophid profile image
Andreas Møller

Add the user state to a common ancestor. Pass the user object down as props.

State management is by far the hardest part of frontend development. But react offers some if the best tools out there.