An auto-updating timeago component for React Native

Tyler Hughes is giving us a chance to see how to integrate external JavaScript libraries into React Native. In doing so he's providing us a fantastic wrapper for momentjs.com. If you've ever worked with dates, you know how much it's appreciated.

react-native-timeago on GitHub

An auto-updating timeago component for React Native using moment.js.

var React = require('react-native');
var TimeAgo = require('react-native-timeago');
var timestamp = "2015-06-21T06:24:44.124Z"; // Any valid date string

var MyComponent = React.createClass({
  ...

  render() {
    return (
      <TimeAgo time={timestamp} />
    )
  }

  ...
});