Browse Source

Update components-and-props.md (#2601)

main
amdwit 5 years ago
committed by GitHub
parent
commit
70826654df
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      content/docs/components-and-props.md

2
content/docs/components-and-props.md

@ -60,7 +60,7 @@ However, elements can also represent user-defined components:
const element = <Welcome name="Sara" />;
```
When React sees an element representing a user-defined component, it passes JSX attributes to this component as a single object. We call this object "props".
When React sees an element representing a user-defined component, it passes JSX attributes and children to this component as a single object. We call this object "props".
For example, this code renders "Hello, Sara" on the page:

Loading…
Cancel
Save