Skip to content

Instantly share code, notes, and snippets.

@ahamedali95
Created Feb 11, 2020
Embed
What would you like to do?
import React, { Component } from 'react';
import autobind from 'autobind-decorator';
import lodash from 'lodash';
class Home extends Component {
state = {
value: ''
};
@autobind
handleChange(e) {
this.setState({
value: e.target.value
});
}
render() {
return (
<input
type="text"
value={this.state.value}
onChange={this.handleChange}
/>
);
}
}
export default Home;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment