Why My Map Fuction Dont Works In An Array?
My map dont appears in my component. I'm trying to make a carousel to show phrases and authors (one testimonial / author at time). I put the map in an array but it doesn't work. I
Solution 1:
The quotes
array is wrapping the array produced by the .map
in an extraneous array. Remove the extra array around the result of the .map
:
const quotes = data.socialProve.map((quote) => {
return <div key={quote.toString()}>{quote.socialProve}</div>;
});
Post a Comment for "Why My Map Fuction Dont Works In An Array?"