A
A
Alexander2021-04-01 12:58:19
React
Alexander, 2021-04-01 12:58:19

How to display post publication date in react?

How can I display the publication date of a post in react?
There is an array of posts and for each you need to add your own publication time

let postsElements = [...posts]
    .reverse()
    .map((item) => <Post text={item.text} smallPhoto={smallPhoto} date={???} key={item.id} />)

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question