I am learning React would like to know the definition or what is its use of refs, I have this function within a submit, what value does it get from refs?
onSubmit(e) {
e.preventDefault();
let email = this.refs.email.value.trim();
let password = this.refs.password.value.trim();
render() {
return (
<div>
<h1>Join Short Lnk</h1>
{this.state.error ? <p>{this.state.error}</p> : undefined}
<form onSubmit={this.onSubmit.bind(this)}>
<input type="email" ref="email" name="email" placeholder="Email"/>
<input type="password" ref="password" name="password" placeholder="Password"/>
<button>Create Account</button>
</form>
<Link to="/">Already have an account?</Link>
</div>