Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
import React, { Component } from 'react';
class App extends Component {
state = {
inputs: [],
showState: false
};
handleSubmit = (event) => {
event.preventDefault();
this.setState(prevState => ({
showState: true
}));
}
render() {
return (
<div className='App'>
<form onSubmit={this.handleSubmit}>
<button type='submit'>Submit</button>
</form>
</div>
);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.