Skip to content

Commit

Permalink
refactor(examples): add important comment about vue 3.5
Browse files Browse the repository at this point in the history
  • Loading branch information
softbeehive committed Jan 13, 2025
1 parent abb2d7a commit bb59f50
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions examples/CardElement.vue
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ const cardOptions = ref<StripeCardElementOptions>({
})
const stripeLoaded = ref(false)
// Vue 3.5 and newer, for older vue versions use ref()
const elementsComponent = useTemplateRef("elementsComponent")
const cardComponent = useTemplateRef("cardComponent")
const stripe = ref<Stripe | null>(null)
Expand Down
1 change: 1 addition & 0 deletions examples/ExpressCheckoutElement.vue
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ onBeforeMount(() => {
})
})
// Vue 3.5 and newer, for older vue versions use ref()
const elementsComponent = useTemplateRef("elementsComponent")
const expressCheckoutComponent = useTemplateRef("expressCheckoutComponent")
Expand Down
2 changes: 1 addition & 1 deletion examples/PaymentElementDeferred.vue
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ const paymentElementOptions = ref<StripePaymentElementOptions>({
const stripeLoaded = ref(false)
const clientSecret = ref("")
// Define component refs
// Vue 3.5 and newer, for older vue versions use ref()
const elementsComponent = useTemplateRef("elementsComponent")
const paymentComponent = useTemplateRef("paymentComponent")
Expand Down

0 comments on commit bb59f50

Please sign in to comment.