mirror of
https://github.com/jbranchaud/til
synced 2026-01-03 15:18:01 +00:00
Fix a couple minor typos
This commit is contained in:
@@ -15,7 +15,7 @@ class MyAutofocusInput extends React.Component {
|
|||||||
if (component) {
|
if (component) {
|
||||||
component.focus();
|
component.focus();
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
return (
|
return (
|
||||||
@@ -24,7 +24,7 @@ class MyAutofocusInput extends React.Component {
|
|||||||
value={this.props.value}
|
value={this.props.value}
|
||||||
onChange={this.props.onChange}
|
onChange={this.props.onChange}
|
||||||
/>
|
/>
|
||||||
)
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
@@ -32,7 +32,7 @@ class MyAutofocusInput extends React.Component {
|
|||||||
When this component gets rendered, the input will be focused via our
|
When this component gets rendered, the input will be focused via our
|
||||||
`focusInput` function.
|
`focusInput` function.
|
||||||
|
|
||||||
Note: refs only work with class component, so don't try to use it on a
|
Note: refs only work with class components, so don't try to use it with a
|
||||||
functional component.
|
functional component.
|
||||||
|
|
||||||
See [Refs and the DOM](https://reactjs.org/docs/refs-and-the-dom.html) in
|
See [Refs and the DOM](https://reactjs.org/docs/refs-and-the-dom.html) in
|
||||||
|
|||||||
Reference in New Issue
Block a user