Subscribe to my email list now at http://jauyeung.net/subscribe/
Follow me on Twitter at https://twitter.com/AuMayeung
Many more articles at http...
For further actions, you may consider blocking this person and/or reporting abuse
Hi John,
Thanks for this nice article.
I am novice to React.
Was trying to replicate the given code but getting an error in image & video search at line no 57.
Can you please help me to find out why it throws the error?
TypeError: Cannot read property 'query' of undefined
(anonymous function)
D:/Learn/React/react-examples/image-app/src/VideoSearchPage.js:57
54 | type="text"
55 | name="query"
56 | placeholder="Keyword"
Thanks very much for reading.
Did you have Formik and Yup installed?
Also, this part:
is pretty important. You've to remember to pass that in.
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?