mirror of
https://github.com/reactjs/react.dev.git
synced 2026-02-24 04:33:10 +00:00
Updated createRef example not to use class property syntax
This commit is contained in:
@@ -1,6 +1,10 @@
|
||||
class MyComponent extends React.Component {
|
||||
// highlight-next-line
|
||||
inputRef = React.createRef();
|
||||
constructor(props) {
|
||||
super(props);
|
||||
|
||||
// highlight-next-line
|
||||
this.inputRef = React.createRef();
|
||||
}
|
||||
|
||||
render() {
|
||||
// highlight-next-line
|
||||
|
||||
Reference in New Issue
Block a user