function UserItem({ user }) { return <li>{user.name}</li>; } function UserList() { const users = [ { id: 1, name: 'Ali' }, { id: 2, name: 'Sara' }, { id: 3, name: 'Reza' }, ]; return ( <ul> {users.map((user) => ( <UserItem key={user.id} user={user} /> ))} </ul> ); }