1.0.0 • Published 7 years ago

react-meetup-meetups v1.0.0

Weekly downloads
2
License
MIT
Repository
github
Last release
7 years ago

react-meetup-meetups

npm package

Fetch list of meetup.com meetups using their API and a ReactJS render prop.

You'll need a meetup.com API Key and the ID of the meetup(s) you want to fetch.

Usage

import Meetups from "react-meetup-meetups"

const meetupsIds = [ 9114182, 2753202, 10685042 ];
const apiKey = "xxxxxx";

const fmtTime = time => new Date(time).toISOString();

const App = () => (
  <div>
    <h3>Next meetups:</h3>
    <Meetups
      apiKey={apiKey}
      meetupsIds={meetupsIds}
      render={results => results.map(({time, name}) => <li>{fmtTime(time)} : {name}</li>)}
      loading={() => <div>Loading...</div>}
    />
  </div>
);

See full example and demo

Also, the codesandbox live usage example :