1.0.1 • Published 3 years ago

wrap-presence v1.0.1

Weekly downloads
-
License
MIT
Repository
github
Last release
3 years ago

🌙 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;
}
1.0.1

3 years ago

1.0.0

3 years ago

0.7.7

3 years ago