There was an error while loading. Please reload this page.
1 parent 128c45e commit af46663Copy full SHA for af46663
src/post-editor-02-state.js
@@ -1,10 +1,14 @@
1
import React from 'react'
2
3
class Editor extends React.Component {
4
- state = {isSaving: true}
+ state = {isSaving: false}
5
+ handleSubmit = e => {
6
+ e.preventDefault()
7
+ this.setState({isSaving: true})
8
+ }
9
render() {
10
return (
- <form>
11
+ <form onSubmit={this.handleSubmit}>
12
<label htmlFor="title-input">Title</label>
13
<input id="title-input" />
14
0 commit comments