You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It's good to practice splitting things into smaller components and passing props etc, but I just wanted to highlight that sometimes it makes things more complicated.
e.g. you're passing pretty much all of the Egg state down to Screen, which pretty much passes all of that down to other components. You could probably bypass Screen entirely and have a slightly more complex render method in Egg, but lose all the complexity/potential for errors caused by having to pass things down through multiple levels.
This would also mean you don't need the extra if statement in Egg's render.
It's good to practice splitting things into smaller components and passing props etc, but I just wanted to highlight that sometimes it makes things more complicated.
e.g. you're passing pretty much all of the
Egg
state down toScreen
, which pretty much passes all of that down to other components. You could probably bypassScreen
entirely and have a slightly more complex render method inEgg
, but lose all the complexity/potential for errors caused by having to pass things down through multiple levels.This would also mean you don't need the extra if statement in Egg's render.
The text was updated successfully, but these errors were encountered: