15.4.1-rc.4 • Published 7 years ago
react-form-element v15.4.1-rc.4
React From Element
Plugin react to describe HTML Form Elements. Invoke properties to work with this type elements.
Features:
- Apply a React Component as Form Element (Only a simulation).
- Dispatch to events.
- Update state by events.
Motivation
As a Form Element on HTML5.
Examples
const {FormElement} = require('react-form-element')
class MyComp extends React.Component {
constructor (props) {
this.state = {value:''}
}
render () {
render <div>
<div>
<input type="text"
onChange={FormElement.InvokeChange(this, 'state.value')}
value={this.state.value} />
</div>
<div>
<div>
<h2>Preview</h2>
<h4>{this.state.value}</h4>
</div>
</div>
</div>
}
}
Apply FormElement
const {FormElement} = require('react-form-element')
class MyComponent extends React.Component {
constructor (props) {
this.state = {value: ""}
FormElement.implement(this)
}
render () {
return <input onChange={this.InvokeChange(this.transferDOMEvent('onChange'))}>
}
}
class MyAPP extends React.Component {
constructor (props) {
this.state = {
name: ""
}
}
render () {
return <div>
<label>{this.state.name}</label>
<MyComponent onChange={FormElement.InvokeChange(this, 'state.name')} />
</div>
}
}
15.4.1-rc.4
7 years ago
15.4.1-rc.3
7 years ago
15.4.1-rc.2
7 years ago
15.4.1-rc.1
7 years ago
15.4.1-rc.0
7 years ago
15.4.1-beta.0
7 years ago
0.0.0-alpha.8.4
7 years ago
0.0.0-alpha.8.3
7 years ago
0.0.0-alpha.8.1
7 years ago
0.0.0-alpha.7
7 years ago
0.0.0-alpha.6
7 years ago
0.0.0-alpha.5
7 years ago
0.0.0-alpha.4
7 years ago
0.0.0-alpha.3
7 years ago
0.0.0-alpha.2
7 years ago
0.0.0-alpha.1
7 years ago
0.0.0-alpha.0
7 years ago