# use-pluggy-connect

> React hook to integrate Pluggy Connect.

Latest version **1.1.2** (published 2024-08-23) · MIT license · 0 weekly downloads

## Install

```sh
npm install use-pluggy-connect
pnpm add use-pluggy-connect
yarn add use-pluggy-connect
bun add use-pluggy-connect
```

## Health

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

Positive: has types; no vulnerabilities.

Warnings: low downloads; no esm support.

Negative: abandoned.

## Facts

| | |
|---|---|
| Version | 1.1.2 |
| Published | 2024-08-23 |
| First published | 2023-08-23 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Node | >=20.8.1 |
| Dependencies | 1 |
| Unpacked size | 415.5 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | NicolasMontone |
| Maintainers | nicolasmontone |
| Keywords | react, react-component, pluggy |

## Links

- npm: https://www.npmjs.com/package/use-pluggy-connect
- Repository: https://github.com/pluggyai/use-pluggy-connect
- Homepage: https://github.com/pluggyai/use-pluggy-connect#readme
- Issues: https://github.com/pluggyai/use-pluggy-connect/issues
- npm.io page: https://npm.io/package/use-pluggy-connect

## Dependencies (1)

- [pluggy-connect-sdk](https://npm.io/package/pluggy-connect-sdk.md) ^2.8.1

## Alternatives

- [mobx-react](https://npm.io/package/mobx-react.md) — 2.8M weekly downloads
- [rc-tree](https://npm.io/package/rc-tree.md) — 2.6M weekly downloads
- [@react-oauth/google](https://npm.io/package/@react-oauth/google.md) — 1.3M weekly downloads
- [@wagmi/connectors](https://npm.io/package/@wagmi/connectors.md) — 877.0K weekly downloads
- [vee-validate](https://npm.io/package/vee-validate.md) — 836.4K weekly downloads

## Recent versions

- 1.1.2 (latest) — 2024-08-23
- 1.1.1 — 2024-08-22
- 1.1.0 — 2024-08-22
- 1.0.2 — 2023-08-24
- 1.0.1 — 2023-08-23
- 1.0.0 — 2023-08-23

## README

# use-pluggy-connect

> React hook to integrate Pluggy Connect.

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

## Install

```bash
npm install --save use-pluggy-connect
```

or

```bash
pnpm install --save use-pluggy-connect
```

or

```bash
yarn add use-pluggy-connect
```

or

```bash
bun install --save use-pluggy-connect
```

## Usage

### React

```tsx
import React, { useCallback } from 'react'

import usePluggyConnect from 'use-pluggy-connect'

const App = () => {
  const handleEvent = useCallback((payload) => {
    console.log(`[Event]: ${payload}`)
  }, [])

  const { init, error, ready } = usePluggyConnect({
    url: 'https://connect.pluggy.dev',
    connectToken: 'eyJhbGciOiJSUzI1NiIsInR5cCI6IJ9...',
    onEvent: handleEvent,
  })

  if (!ready) {
    return <div>Loading...</div>
  }
  if (error) {
    return <div>Error: {error.message}</div>
  }
  return (
    <div>
      <button onClick={init}>Init</button>
    </div>
  )
}
export default App
```

### Nextjs


```tsx
'use client'

import usePluggyConnect from 'use-pluggy-connect'

export default function OpenPluggyButton() {
  const { init } = usePluggyConnect({
    connectToken:
      '...',
  })

  return <button onClick={init}>Open Pluggy</button>
}
```

#### TODOS: 

- [ ] Add tests
- [ ] Improve examples

---
_Source: https://npm.io/package/use-pluggy-connect · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
