npm install --save-dev @maferland/spotify-react
// or
yarn add @maferland/spotify-react
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)