mirror of
https://github.com/reactjs/react.dev.git
synced 2026-02-24 04:33:10 +00:00
Add etymological background to "props". (#177)
This commit is contained in:
@@ -30,7 +30,7 @@ function Welcome(props) {
|
||||
}
|
||||
```
|
||||
|
||||
This function is a valid React component because it accepts a single "props" object argument with data and returns a React element. We call such components "functional" because they are literally JavaScript functions.
|
||||
This function is a valid React component because it accepts a single "props" (which stands for properties) object argument with data and returns a React element. We call such components "functional" because they are literally JavaScript functions.
|
||||
|
||||
You can also use an [ES6 class](https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Classes) to define a component:
|
||||
|
||||
|
||||
Reference in New Issue
Block a user