React: getting started

Lesson 07 · 11 min

State is lifted, children are inserted

What two children share lives in the parent. A markup slot is children, not copy-paste.

Two fields need to know the same query — the state lives in the parent, props go down, an onQuery callback goes up. That's lifting state up. children is what's put between the tags: <Card>body</Card>. That's how wrappers are made, not with an html prop.

Sign in to continue

The rest of this lesson opens after sign up

The first lesson of every course is open without an account. To read on, solve the practice and use Ask, create a free account or log in.