Releases: stripe/react-stripe-js
Releases · stripe/react-stripe-js
v1.0.0-beta.6
Fixes
Invalid import of prop-types
causing an error when using the ES Module version of this library (#33)
Various Stripe.js types from @stripe/stripe-js.
v1.0.0-beta.5
Fixes
- Fix types for TS projects not using esModuleInterop (#31)
v1.0.0-beta.4
Features
- Adds TypeScript support, to be used in tandem with the latest
@stripe/stripe-js
release. For more information, see our TypeScript versioning policy.
v1.0.0-beta.3
More examples and miscellaneous documentation updates.
Fixes
- Removes a warning about
useLayoutEffect
when using React Stripe.js with server side rendering.
v1.0.0-beta.2
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>
);