# @maferland/spotify-react

> 🤿 React component to display Spotify recently played tracks

Latest version **0.3.0** (published 2020-10-24) · MIT license · 0 weekly downloads

## Install

```sh
npm install @maferland/spotify-react
pnpm add @maferland/spotify-react
yarn add @maferland/spotify-react
bun add @maferland/spotify-react
```

## Health

**Score 20/100 (F)** — status: abandoned.

Positive: esm support; no vulnerabilities.

Warnings: low downloads; no types; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.3.0 |
| Published | 2020-10-24 |
| First published | 2020-10-23 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | ESM + CommonJS |
| Node | >=10 |
| Dependencies | 2 |
| Unpacked size | 29.6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | Marc-Antoine Ferland |
| Maintainers | maferland |

## Links

- npm: https://www.npmjs.com/package/@maferland/spotify-react
- Repository: https://github.com/maferland/spotify-react
- Homepage: https://github.com/maferland/spotify-react#readme
- Issues: https://github.com/maferland/spotify-react/issues
- npm.io page: https://npm.io/package/@maferland/spotify-react

## Dependencies (2)

- [react-query](https://npm.io/package/react-query.md) ^2.25.2
- [isomorphic-fetch](https://npm.io/package/isomorphic-fetch.md) ^3.0.0

## Recent versions

- 0.3.0 (latest) — 2020-10-24
- 0.2.0 — 2020-10-24
- 0.1.0 — 2020-10-23

## README

<div align="center">
<h1>🤿 @maferland/spotify-react</h1>

<p>React component & hooks to retrieve Spotify recently played tracks </p>
</div>

---

[![NPM](https://img.shields.io/npm/v/@maferland/spotify-react.svg)](https://www.npmjs.com/package/@maferland/spotify-react)
[![JavaScript Style Guide](https://img.shields.io/badge/code_style-standard-brightgreen.svg)](https://standardjs.com)

<!-- START doctoc generated TOC please keep comment here to allow auto update -->
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->

- [Installation](#installation)
- [Usage](#usage)
- [Author](#author)
- [LICENSE](#license)

<!-- END doctoc generated TOC please keep comment here to allow auto update -->

## Installation

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

## Usage

```js
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:

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

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

## Author

- [Marc-Antoine Ferland](https://maferland.com)

## LICENSE

[MIT](LICENSE)

---
_Source: https://npm.io/package/@maferland/spotify-react · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
