Closed Azeem-Dev closed 3 years ago
Running your second project (actually following you on youtube) whenever I pass tours={tours} to the Tours component and In Tours component whenever I try to make a map of the current array it say tours.map is not a function
https://github.com/john-smilga/react-projects/blob/14e830c9eecd2ad68e612de70232b82510a3fa89/2-tours/final/src/Tours.js#L12
Okay found the answer it seems you have to initialize the tours to an empty array not an empty string
Running your second project (actually following you on youtube) whenever I pass tours={tours} to the Tours component and In Tours component whenever I try to make a map of the current array it say tours.map is not a function
https://github.com/john-smilga/react-projects/blob/14e830c9eecd2ad68e612de70232b82510a3fa89/2-tours/final/src/Tours.js#L12