## useElements

To safely pass the payment information collected by the Payment Element to the Stripe API,
access the `Elements` instance so that you can use it with `stripe.confirmPayment`.

If you need to access an Element from a class component, use [ElementsConsumer](https://docs.stripe.com/react_stripe_js/elements/elements_consumer.md) instead.

### Return value

- `result`
  Returns the current `Elements` instance or `null` while the provider is still loading.

### Example

```title
Call useElements
```
