# react-inbox-link

> React bindings for the LinkToInbox API

Latest version **0.0.5** (published 2023-10-01) · MIT license · 0 weekly downloads

## Install

```sh
npm install react-inbox-link
pnpm add react-inbox-link
yarn add react-inbox-link
bun add react-inbox-link
```

## Health

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

Positive: has types; no vulnerabilities; high quality score.

Warnings: low downloads; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.5 |
| Published | 2023-10-01 |
| First published | 2023-09-19 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 8.8 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Chris Andrejewski |
| Maintainers | andrejewski |
| Keywords | email, inbox, link |

## Links

- npm: https://www.npmjs.com/package/react-inbox-link
- Repository: https://github.com/andrejewski/react-inbox-link
- Homepage: https://github.com/andrejewski/react-inbox-link#readme
- Issues: https://github.com/andrejewski/react-inbox-link/issues
- npm.io page: https://npm.io/package/react-inbox-link

## Alternatives

- [@expo/fingerprint](https://npm.io/package/@expo/fingerprint.md) — 6.2M weekly downloads
- [@azure/monitor-opentelemetry-exporter](https://npm.io/package/@azure/monitor-opentelemetry-exporter.md) — 850.0K weekly downloads
- [@azure/monitor-opentelemetry](https://npm.io/package/@azure/monitor-opentelemetry.md) — 624.0K weekly downloads
- [@posthog/ai](https://npm.io/package/@posthog/ai.md) — 423.3K weekly downloads
- [fakefilter](https://npm.io/package/fakefilter.md) — 63.9K weekly downloads

## Recent versions

- 0.0.5 (latest) — 2023-10-01
- 0.0.4 — 2023-09-23
- 0.0.3 — 2023-09-21
- 0.0.2 — 2023-09-20
- 0.0.1 — 2023-09-19

## README

# `react-inbox-link`

The React bindings for the [LinkToInbox.com](https://linktoinbox.com) API offering both component and hook interfaces encapsulating the standard Web Component and JavaScript API interfaces respectively.

This package also has TypeScript support for a smoother integration.

```sh
npm install react-inbox-link
```

## Usage

The component API:

```tsx
import { InboxLink } from 'react-inbox-link'

function Example() {
  return (
    <InboxLink
      publishableKey="pk_YOUR_KEY"
      recipientAddress="user@example.com"
    />
  )
}
```

The hook API:

```tsx
import { useInboxLink } from 'react-inbox-link'

function Example() {
  const inboxLink = useInboxLink('pk_YOUR_KEY', {
    recipientAddress: 'user@example.com',
  })

  switch (inboxLink.type) {
    case 'loading':
      return <p>Loading…</p>
    case 'link_not_available':
      if (inboxLink.error) {
        console.error(inboxLink.error)
      }
      return null
    case 'link_data':
      const { link, icon, providerName } = inboxLink.data
    // Render how you'd like
  }
}
```

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