With an HTML input I would just do this.refs.whatever.value but what do I do with a Semantic <Input/>?
Using a ref is accessing the DOM directly and not preferred. The React way to get the value from an input is using the onChange callback and getting the value from the event:
<input onChange={e => console.log(e.target.value)} />
You can get the value for an <Input /> just as you can in React:
<Input onChange={e => console.log(e.target.value)} />
I think its changed now to:
onChange={(e,data)=>{
console.log(data.value)
}
This issue was closed in 2016, necroposting is bad 馃憥
Most helpful comment
Using a
refis accessing the DOM directly and not preferred. The React way to get the value from an input is using the onChange callback and getting the value from the event:You can get the value for an
<Input />just as you can in React: