How to get values from input types using this.refs in Reactjs?

Posted by Jessica Taylor | Updated on

If you want to get values from input types using this.refs in Reactjs? using ref={ inputRef => this.input = inputRef } is considered legacy now. In React 16.3 onwards, you can use the code below:


If you like this question & answer and want to contribute, then write your question & answer and email to freewebmentor[@]gmail.com. Your question and answer will appear on FreeWebMentor.com and help other developers.

Related Questions & Answers