React Stripe.js adheres to Semantic Versioning.
- No code changes from the last alpha release
- Add official docs
- Add a migration guide
- Update Readme
- Fix a vulnerability in a build dependency
- Code quality
- Add support for passing an Element component to
elements.getElement
const cardElement = elements.getElement(CardElement);
- Add a new hook,
useStripe
which returns the Stripe object passed to<Elements>
const stripe = useStripe();
- Expand
<ElementsConsumer>
to provide both the Elements and Stripe objects.
<ElementsConsumer>
{({stripe, elements}) => (
<MyCheckoutForm stripe={stripe} elements={elements} />
)}
</ElementsConsumer>
- Passing
undefined
to thestripe
prop of<Elements>
is no longer possible. If you are async loading Stripe.js, you will need to explicitly passnull
. - The value provided by
<ElementsConsumer>
has changed to support providing Stripe as well as Elements.
Fix minified UMD build
Fix dependencies
- Drop injectElements since it is easy to implement with
ElementsConsumer
if users want to use the HOC pattern.
- Better errors when trying to call
useElements
or mount components that rely on Elements context outside of an provider. - Test cleanup
Initial alpha release
For changes to versions before v7.0.0 please refer to the
react-stripe-elements
changelog.