Getting started with React Stripe.js

Опубликовано: 30 Октябрь 2024
на канале: Stripe Developers
34,847
536

In this episode, you'll learn how we use React with Stripe Samples, a collection of GitHub repositories showing full end to end examples of Stripe integrations. We'll start from scratch and build a simple create-react-app style app with Stripe.js and React Stripe.js installed. You'll learn about the loadStripe helper, Elements and ElementsConsumer providers, and how to use the useElements and useStripe hooks for functional react based components.

Presenter

CJ Avilla - Developer Advocate at Stripe -   / cjav_dev  

Resources

React Stripe.js official docs: https://stripe.com/docs/stripe-js/react
Stripe.js docs: https://stripe.com/docs/stripe-js
Create React App documentation: https://create-react-app.dev

Server Starters

Node.js Express Starter -    • Node.js Express Starter  
Ruby Sinatra Starter -    • Ruby Sinatra Starter  
Python Flask Starter -    • Python Flask Starter  
.NET Core Starter -    • .NET Core Starter  
Java Spark Starter -    • Java Spark Starter  
Go Echo Starter -    • Go and Echo starter  

Table of contents

00:00 Introduction
00:40 Scaffold basic file and directory structure and install react dependencies
01:48 Create and render a basic react app
03:30 Install stripe dependencies
04:25 loadStripe
05:23 Elements and ElementsConsumer providers
06:03 CardElement/IdealBankElement/CardNumberElement components
06:50 useStripe and useElements hooks

Support
If you have a question, please feel free to reach out to our support team at https://support.stripe.com/ or join us on Discord https://stripe.com/go/developer-chat.

Updates
Sign up to stay updated with developer news: https://go.stripe.global/dev-digest

Feedback
If you have any feedback about this or other episodes, let us know: https://forms.gle/VjNqzRhotM2snYo88.
#Stripe #Payments