Chrome Extension

Bind form or input elements with state in React

class CName extends Component {
    constructor() {
        this.state = {
            firstname: ''
        }
    }

    handleInputChange = (e) => {
        this.setState({
            firstname: e.target.value
        });
    }

    render() {
        return (
            <div>
                <input type="text" value={this.state.firstname} onChange={this.handleInputChange} />
            </div>
        );
    }
}
We are a bunch of lazy programmers so we developed this chrome extension
search code from your favorite search engine
Install Now
Was this helpful?
0 Comments
Open Code Manager We are hiring