react-meetup-meetups
v1.0.0
Published
Fetch meetup.com meetups the React way
Downloads
3
Maintainers
Readme
react-meetup-meetups
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 :