Welcome aboard! We are happy you are here and wish you good net-raft!
// you must install npm i react-relative-time
import React from 'react'
import RelativeTime from 'react-relative-time'
class App extends React.Component {
render() {
let yourDate = new Date("Wed Apr 18 2018 15:48:59 GMT+0400")
return (
<div>
<p><RelativeTime value={yourDate} titleFormat="YYYY/MM/DD HH:mm" /></p>
</div>
)
}
}
export default App;
The most helpful REACT solutions
How to get client ip address using react ?REACT Click to see more ... 19.2K 421