github stripe/react-stripe-js v1.0.0-beta.2

latest releases: v5.0.0-rc.1, v5.0.0-rc.0, v4.0.2...
pre-release5 years ago

Reversion to v1.

Adds support for passing Promise<StripeObject | null> to the stripe prop of Elements. This removes the need for users to create and manage their own state when asynchronously loading Stripe.js and can be used with the loadStripe function from the Stripe.js module.

import {loadStripe} from '@stripe/stripe-js';

const stripePromise = loadStripe('pk_test_6pRNASCoBOKtIshFeQd4XMUh');

const App = () => (
  <Elements stripe={stripePromise}>
    {/* ... */}
  </Elements>
);

Don't miss a new react-stripe-js release

NewReleases is sending notifications on new releases.