mirror of
https://github.com/reactjs/react.dev.git
synced 2026-02-24 12:43:05 +00:00
Insert blockquote on prop value explanation. (#9770)
While reading the page, the "chain of thought" is broken by stating that the `tempertature` and `onTemperatureChange` don't have any special meaning. Making this a blockquote makes that note look more like a comment and keep the "chain of thought" intact.
This commit is contained in:
@@ -196,7 +196,7 @@ Now, when the `TemperatureInput` wants to update its temperature, it calls `this
|
||||
this.props.onTemperatureChange(e.target.value);
|
||||
```
|
||||
|
||||
Note that there is no special meaning to either `temperature` or `onTemperatureChange` prop names in custom components. We could have called them anything else, like name them `value` and `onChange` which is a common convention.
|
||||
> Note that there is no special meaning to either `temperature` or `onTemperatureChange` prop names in custom components. We could have called them anything else, like name them `value` and `onChange` which is a common convention.
|
||||
|
||||
The `onTemperatureChange` prop will be provided together with the `temperature` prop by the parent `Calculator` component. It will handle the change by modifying its own local state, thus re-rendering both inputs with the new values. We will look at the new `Calculator` implementation very soon.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user