TypeError: _data_Carddata__WEBPACK_IMPORTED_MODULE_2___default.a.map is not a function
This is telling you that what you are trying to map does not have a function/method called map. Since all arrays have that, that means that Carddata is not an array.
My first instinct would have been to console.log out Cardata to see what it is.
I’m guessing that it’s undefined because you importing it as a default export:
import Carddata from '../data/Carddata';
from a file that doesn’t seem to have a default export. Actually it doesn’t have any exports. If you change the first line in Carddata.js to:
export default [
it may start working. Alternatively, you could add:
Cool. In the case of the code right above, you don’t actually need the Fragment tags (<> and </>) if you just have one element in it (Card). If it’s just one you don’t need it. You were mapping before which would have given you multiple ones so they need to be wrapped in something.