Hello, when I try to save a book i get this error,
TypeError: Cannot read property 'catch' of undefined
BookForm._this.onSubmit
C:/code/bookworm/src/components/forms/BookForm.js:55
52 | this.setState({ errors });
53 | if (Object.keys(errors).length === 0) {
54 | this.setState({ loading: true });
55 | this.props
56 | .submit(this.state.data)
57 | .catch(err =>
58 | this.setState({ errors: err.response.data.errors, loading: false })
I run mongo db in cmd windows like this :
C:\Program Files\MongoDB\Server\3.4\bin\mongod --dbpath C:\code\bookworm-api --port 27017