Answers for "Cannot find name 'RefObject'"

0

Cannot find name 'RefObject'

class TestApp extends React.Component<AppProps, AppState> {
    private stepInput: React.RefObject<HTMLInputElement>;
    constructor(props) {
        super(props);
        this.stepInput = React.createRef();
    }
    render() {
        return <input type="text" ref={this.stepInput} />;
    }
}
Posted by: Guest on November-16-2020

Code answers related to "Cannot find name 'RefObject'"

Code answers related to "Javascript"

Browse Popular Code Answers by Language