React Stripe Elements screenshot

React Stripe Elements

Author Avatar Theme by Stripe archive
Updated: 26 Mar 2021
3028 Stars

Moved to stripe/react-stripe-js.

Overview:

The content discusses the migration of a project to the @stripe/react-stripe-js package and the decision to rename, rework, and move the project. It emphasizes using React Stripe.js for new or updated Stripe integrations. The project serves as a thin React wrapper around Stripe.js and Stripe Elements, allowing the addition of elements to any React app while managing the state and lifecycle of elements.

Features:

  • React components for Stripe.js and Stripe Elements
  • Stripe.js / Stripe Elements API reference
  • StripeProvider for Stripe context
  • Elements component for element groups
  • injectStripe Higher-Order Component for payment form setup
  • Easy integration for accepting payments with React Stripe.js
  • Advanced integrations like loading Stripe.js asynchronously and server-side rendering

Installation:

To install react-stripe-elements:

  1. Install with yarn:
    yarn add react-stripe-elements
    
  2. Or with npm:
    npm install react-stripe-elements
    
  3. Alternatively, use the UMD build to export a global ReactStripeElements object.

To load Stripe.js in your application, follow the provided guidance in the content.

Summary:

The content introduces the migration of a project to @stripe/react-stripe-js and the benefits of using React Stripe.js for new Stripe integrations. It highlights the features of this react wrapper for Stripe.js and Stripe Elements, offering easy integration for payment processing within React apps. The installation guide provided assists users in setting up the theme effectively.