samedi 30 octobre 2021

TypeError: .map is not a function don't understand what's wrong

I don't understand why this component doesn't work Here is link to img "because somehow i can't post image directly [1]: https://i.stack.imgur.com/Ax7im.png Thank's for any help Here you have code:

import React from 'react';
import ReactDOM from 'react-dom';
import Postitem from "./Postitem";

const Postlist=(post,title)=>{

return (
<div>
         <h1 style=>{title}</h1>
{post.map((post) =>
 <Postitem post={post} key={post.id}/>)};
</div>
 
)};
export default Postlist;
      



Aucun commentaire:

Enregistrer un commentaire