I'm getting the same error as Kishor but in ImageSearchPage.js
TypeError: Cannot read property 'query' of undefined
68 | type="text" 69 | name="query" 70 | placeholder="Keyword"
71 | value={values.query || ""} | ^ 72 | onChange={handleChange} 73 | isInvalid={touched.description && errors.query} 74 | />
I do have const schema = yup.object({ query: yup.string().required("Query is required"), });
but still experiencing the problem. I don't think the problem is due to yup
Did you destructure values property from the parameter?
Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment's permalink.
Hide child comments as well
Confirm
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
I'm getting the same error as Kishor but in ImageSearchPage.js
TypeError: Cannot read property 'query' of undefined
68 | type="text"
69 | name="query"
70 | placeholder="Keyword"
I do have
const schema = yup.object({
query: yup.string().required("Query is required"),
});
but still experiencing the problem. I don't think the problem is due to yup
Did you destructure values property from the parameter?