DEV Community

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

joetex profile image
Joel Ruiz Author • Edited on

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!

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.