REACT time ago react - Net-Raft.com

Welcome aboard! We are happy you are here and wish you good net-raft!




Just a Web Code Solution

time ago react


 335

REACT


3

// 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;


By     Created   
The power of the user (%)
72%



The most helpful REACT solutions

How to get client ip address using react ?How to get client ip address using react ?REACT

Click to see more ...

  5.8K     419

how to get the type of a device using react ?how to get the type of a device using react ?REACT

Click to see more ...

  1.5K     203

country dropdown using reactcountry dropdown using reactREACT

Click to see more ...

  870     127

How to get latitude and longitude using react/javascript ?How to get latitude and longitude using react/javascript ?REACT

Click to see more ...

  649     104

get client country reactget client country reactREACT

Click to see more ...

  457     82

get ip address reactget ip address reactREACT

Click to see more ...

  459     81

time ago reacttime ago reactREACT

Click to see more ...

  335     74

detect mobile device reactdetect mobile device reactREACT

Click to see more ...

  318     58

detect browser reactdetect browser reactREACT

Click to see more ...

  319     52

how to detect a mobile device not tablet using react ?how to detect a mobile device not tablet using react ?REACT

Click to see more ...

  267     51