0
3
GGGiovanny Gongora
Create input and use React.createRef API to set up a reference by initializing it as null and declaring the HTML type
class Input extends Component {
constructor() {
super()
this.myInput = React.createRef<HTMLInputElement>(null)
}
render() {
return (
<input ref={this.myInput} type='text' />
)
}
}