1.0.2 • Published 7 years ago
react-input-element v1.0.2
react-input-element
Just like a normal element except it fires onChange and onBlur with the input value rather than the event.
import React from 'react'
import { render } from 'react-dom'
import Input from 'react-input-element'
class Simple extends React.Component {
constructor (props) {
super(props)
this.state = {
value: ''
}
}
render () {
return (
<Input
value={this.state.value}
onChange={value => this.setState({value})}
/>
)
}
}