Skip to content

Commit bb59f50

Browse files
committed
refactor(examples): add important comment about vue 3.5
1 parent abb2d7a commit bb59f50

File tree

3 files changed

+3
-1
lines changed

3 files changed

+3
-1
lines changed

examples/CardElement.vue

+1
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ const cardOptions = ref<StripeCardElementOptions>({
5151
})
5252
const stripeLoaded = ref(false)
5353
54+
// Vue 3.5 and newer, for older vue versions use ref()
5455
const elementsComponent = useTemplateRef("elementsComponent")
5556
const cardComponent = useTemplateRef("cardComponent")
5657
const stripe = ref<Stripe | null>(null)

examples/ExpressCheckoutElement.vue

+1
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ onBeforeMount(() => {
4747
})
4848
})
4949
50+
// Vue 3.5 and newer, for older vue versions use ref()
5051
const elementsComponent = useTemplateRef("elementsComponent")
5152
const expressCheckoutComponent = useTemplateRef("expressCheckoutComponent")
5253

examples/PaymentElementDeferred.vue

+1-1
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ const paymentElementOptions = ref<StripePaymentElementOptions>({
5757
const stripeLoaded = ref(false)
5858
const clientSecret = ref("")
5959
60-
// Define component refs
60+
// Vue 3.5 and newer, for older vue versions use ref()
6161
const elementsComponent = useTemplateRef("elementsComponent")
6262
const paymentComponent = useTemplateRef("paymentComponent")
6363

0 commit comments

Comments
 (0)