I am retrieving the data from mongodb, date comes in isoDate format, I want to convert it and render it. I'm using react.
This is my context.consumer:
<UserContext.Consumer>
{
({ users }) => {
return <div>
<div>
{users.map((u) => {
console.log(users)
return (
<div className='users_list'>
<h1>User Profile: {u.username}</h1>
<p>First Name: {u.firstName}</p>
<p>Last Name: {u.lastName}</p>
<p>Profile created: {u.createdAt}</p>
<h4>Tweets</h4>
</div>
)
})}
</div>
</div>
}
}
</UserContext.Consumer>
I appreciate any ideas. Thanks!