wrap-presence
v1.0.1
Published
A react hook for presence.
Downloads
6
Readme
🌙 wrap-presence
An official wrapper for presence.
📦 Installation
via NPM
npm i --save wrap-presence
via yarn
yarn add wrap-presence
⌨️ Usage
import { wrapPresence } from 'wrap-presence';
const Presence = async () => {
const req = {
platform: 'twitter',
type: 'user',
params: 'atmattt',
};
const {data, error, isLoading} = await wrapPresence(req);
if (isLoading) {
return <p>Loading...</p>
} else if (error) {
return <p>An error has occured!</p>
}
return data;
}