Library/framework for building UIs
class Autocomplete extends React.Component {
componentDidMount() { ... }
componentWillReceiveProps() { ... }
componentWillUnmount() { ... }
handleChange(ev) { ... }
render() {
return (
<div className="autocomplete">
<input onChange={this.handleChange} value={this.state.value} />
<ul className="suggestions">{this.props.suggestions}</ul>
</div>
);
}
}
...
<Autocomplete suggestions={["Bas", "Meindert", "Astrid", ...]} />