chukwuyem

user

Oct 26th, 2020
1,376
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. import React, {useContext} from 'react';
  2. import { UserContext } from '../context/UserContext';
  3.  
  4. const UserList = () => {
  5.     const {Users} = useContext(UserContext);
  6.    
  7.     return (
  8.         <div>
  9.          
  10.         <ul>
  11.           { Users.map(user =><div key={user.id}> <li>{user.id}<br></br> {user.email} </li> </div>)}
  12.         </ul>
  13.         </div>
  14.       )
  15. }
  16.  
  17.  
  18. export default UserList;
RAW Paste Data