# @tailrecursive/bs-react-stripe-elements

> Bindings for Stripe's react-stripe-elements

Latest version **0.0.6** (published 2020-04-06) · MIT license · 0 weekly downloads

## Install

```sh
npm install @tailrecursive/bs-react-stripe-elements
pnpm add @tailrecursive/bs-react-stripe-elements
yarn add @tailrecursive/bs-react-stripe-elements
bun add @tailrecursive/bs-react-stripe-elements
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.6 |
| Published | 2020-04-06 |
| First published | 2020-04-06 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 4 |
| Unpacked size | 14.6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | cnguy |
| Maintainers | davidglez |
| Keywords | bucklescript, react, ui |

## Links

- npm: https://www.npmjs.com/package/@tailrecursive/bs-react-stripe-elements
- Repository: https://github.com/david1820/bs-react-stripe-elements
- Homepage: https://github.com/david1820/bs-react-stripe-elements#readme
- Issues: https://github.com/david1820/bs-react-stripe-elements
- npm.io page: https://npm.io/package/@tailrecursive/bs-react-stripe-elements

## Dependencies (4)

- [react](https://npm.io/package/react.md) ^16.5.1
- [react-dom](https://npm.io/package/react-dom.md) ^16.5.1
- [reason-react](https://npm.io/package/reason-react.md) ^0.5.3
- [react-stripe-elements](https://npm.io/package/react-stripe-elements.md) ^2.0.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

- 0.0.6 (latest) — 2020-04-06
- 0.0.5 — 2020-04-06
- 0.0.4 — 2020-04-06
- 0.0.2 — 2020-04-06
- 0.0.1 — 2020-04-06

## README

# bs-react-stripe-elements

## Introduction

Minimal, hand-generated BuckleScript + ReasonReact bindings for [react-stripe-elements](https://github.com/stripe/react-stripe-elements). The bindings are vanilla, which means it'll mostly be 1-to-1 bindings. However, the bindings will help you out by for example removing stringly-typed code wherever possible.

**State**: _experimental, but active. unpublished and requires polishing_

## Examples / Demo

### Main Demo

- [Demo Site](https://bs-react-stripe-elements.surge.sh)
  - [Code for Demo Site](https://github.com/cnguy/bs-react-stripe-elements/blob/master/examples/Checkout)

Note that these examples are not runnable. You would have to copy the files to your own React app to test them. For testing the bindings, I just constantly `yarn add <path-to-local-directory-of-bs-stripe-react-elements>` within a different web app to get the updated changes.

This demo ideally will match [Stripe's own basic demo](https://github.com/stripe/react-stripe-elements/blob/master/demo/demo/index.js).

### Component Demos

TBD. I will add specific component usage (styling a CardElement for example).

## Installation

### 1

Since the package is currently unpublished, we do not use `npm`. Instead,
we rely on the `master` branch.

- With `yarn`

`yarn add cnguy/bs-react-stripe-elements#master`

- With `npm`

`npm install --save cnguy/bs-react-stripe-elements#master`

### 2

Add `@tailrecursive/bs-react-stripe-elements` to `bsconfig.json` `bs-dependencies`.

### 3

Add `Stripe.js` to your `index.html` file as well. Put it before your app's JS bundle.

```html
<html>
  <head />
  <body>
    <div id="root" />
    <script src="https://js.stripe.com/v3/"></script>
    <script src="bundle.js"></script>
  </body>
</html>
```

## Entry Point

```reason
let component = ReasonReact.statelessComponent("App");

let make = _children => {
  ...component,
  render: _self =>
    <div>
      StripeElements.(
        <StripeProvider apiKey="pk_abcdefghijklmnoprstuvwxyz">
          ...<CheckoutForm />
        </StripeProvider>
      )
    </div>,
};
```

## Changes

Currently unpublished. `master` branch will be the "releases" while the `development` branch will be where we'll be working.

Goal is to figure out all issues and publish a `v0.0.1` that implements a majority of the API's.

## Contributing

Hi! I'm Chau. This is my first `Reason` binding, and it's mostly experimental, but I really, really want to polish it, especially because I think Stripe is cool. Also, I use a lot of Reason libraries made by amazing community members, and so I want to try to give back in some way.

All contributions are welcome, whether it's fixing bugs, advice, or important questions (how will I deal with style props for example? will I make a wrapper, convenient API? etc).

I'm pretty active, so don't hesitate to post an issue or send a pull request.

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