Browse Source

Mention “slots” (#404)

main
Dan Abramov 7 years ago
committed by GitHub
parent
commit
0a3a82679e
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      content/docs/composition-vs-inheritance.md

2
content/docs/composition-vs-inheritance.md

@ -79,7 +79,7 @@ function App() {
[Try it on CodePen.](https://codepen.io/gaearon/pen/gwZOJp?editors=0010)
React elements like `<Contacts />` and `<Chat />` are just objects, so you can pass them as props like any other data.
React elements like `<Contacts />` and `<Chat />` are just objects, so you can pass them as props like any other data. This approach may remind you of "slots" in other libraries but there are no limitations on what you can pass as props in React.
## Specialization

Loading…
Cancel
Save