use-lanyard-react
TypeScript icon, indicating that this package has built-in type declarations

1.0.0 • Public • Published

use-lanyard

A React Hook for Lanyard. An API that exposes your Discord & Spotify presence to the web!

NPM JavaScript Style Guide

Install

npm install --save use-lanyard

Usage

import * as React from 'react'

import { useLanyard } from 'use-lanyard'

const Example = () => {
  const state = useLanyard('DISCORD_ID')
  return (
    <div>
      {state.listening_to_spotify ? `Wohoo! I'm listening to Spotify right now.` : `I'm not listening to anything right now :(`}
    </div>
  )
}

License

MIT © 220ish

Readme

Keywords

none

Package Sidebar

Install

npm i use-lanyard-react

Weekly Downloads

1

Version

1.0.0

License

MIT

Unpacked Size

642 kB

Total Files

25

Last publish

Collaborators

  • 220ish