react-mailigen
TypeScript icon, indicating that this package has built-in type declarations

1.0.2 • Public • Published

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

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 - This simple library gives you the ability to add email to your newsletter lists on Mailigen.

Package Sidebar

Install

npm i react-mailigen

Weekly Downloads

2

Version

1.0.2

License

MIT

Unpacked Size

2.24 MB

Total Files

7

Last publish

Collaborators

  • aulneau