# react-mailigen

> A react component for subscribing emails to a mailigen list

Latest version **1.0.2** (published 2018-10-03) · MIT license · 0 weekly downloads

## Install

```sh
npm install react-mailigen
pnpm add react-mailigen
yarn add react-mailigen
bun add react-mailigen
```

## Health

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

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

Warnings: low downloads.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.2 |
| Published | 2018-10-03 |
| First published | 2018-10-03 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 3 |
| Unpacked size | 2.1 MB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Thomas Osmonson |
| Maintainers | aulneau |
| Keywords | mailigen, react, render-props |

## Links

- npm: https://www.npmjs.com/package/react-mailigen
- Repository: https://github.com/aulneau/react-mailigen
- Issues: https://github.com/aulneau/react-mailigen/issues
- npm.io page: https://npm.io/package/react-mailigen

## Dependencies (3)

- [mailigen](https://npm.io/package/mailigen.md) ^1.0.2
- [prop-types](https://npm.io/package/prop-types.md) ^15.6.2
- [@babel/runtime](https://npm.io/package/@babel/runtime.md) ^7.0.0

## 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.0.2 (latest) — 2018-10-03
- 1.0.1 — 2018-10-03
- 1.0.0 — 2018-10-03

## README

# React Mailigen

This is a renderless react component to help you subscribe users to your mailigen lists.

## Getting started

### Installation

```
yarn add react-mailigen
```

### Example

```jsx
import Mailigen from 'react-mailigen';

<Mailigen email={this.state.email}>
  {({loading, error, success, doSubscribe}) =>
    (<form onSubmit={doSubscribe}>
        <!-- form content -->
    </form>)
  }
</Mailigen>
```

### Props

The component takes the following props:

- `email`: The email address you want to add to your list
- `from`: The email address you want to add to your list
- `id`: (optional) the List ID you want the emails to be added to (defaults to: `process.env.MAILIGEN_LIST`)
- `apiKey`: (optional) the apiKey for your account (defaults to: `process.env.MAILIGEN_API_KEY`)
- `options`: any other options you'd like to pass to your list

#### See also
- [`mailigen-js`](https://github.com/hstove/mailigen-js) - This simple library gives you the ability to add email to your newsletter lists on Mailigen.

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