Skip to content

🤿 React component to display Spotify recently played tracks

License

Notifications You must be signed in to change notification settings

maferland/spotify-react

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🤿 @maferland/spotify-react

React component & hooks to retrieve Spotify recently played tracks


NPM JavaScript Style Guide

Installation

npm install --save-dev @maferland/spotify-react
// or
yarn add @maferland/spotify-react

Usage

import React from 'react'
import ReactDOM from 'react-dom'
import { RecentlyPlayedFeed } from '@maferland/spotify-react'

function App() {
  return (
    <RecentlyPlayedFeed
      userId='12166023407'
      feedStyle={{
        border: '1px solid red'
      }}
      itemStyle={{
        border: '1px dashed blue'
      }}
    />
  )
}

ReactDOM.render(<App />, document.getElementById('root'))

You can also take advantage of the useRecentlyPlayed hooks:

import { useRecentlyPlayed } from '@maferland/spotify-react'

const { isLoading, error, data } = useRecentlyPlayed(12166023407)

Author

LICENSE

MIT

About

🤿 React component to display Spotify recently played tracks

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published