Skip to content

revolunet/react-meetup-meetups

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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 : https://codesandbox.io/s/24p6v31vkj

About

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

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published