jonasschmedtmann/ultimate-react-course

PropType validation error in CityList.jsx and CityItem.jsx in WorldWise project

Aditya-Ghosh-27 opened this issue · 2 comments

If you are following and coding along, you might have come across this error yourself as well, i.e in the Implementing the Cities video.
When you try to pass the city prop to the CityItem.jsx component then you might have come up with this error where it is asking to specify the types of prop that you are passing.

country' is missing in props validation react/prop-types
7:22 error 'country.emoji' is missing in props validation react/prop-types
8:22 error 'country.emoji' is missing in props validation react/prop-types

It is turning out to be like this and for the time being, I have added prop types for each props being passed. If anyone has succesfully resolve this error. Please do leave any resources/ comment that could help me.

Thanks and regards