NuxtN
Nuxtβ€’16mo agoβ€’
9 replies
Jox

Template ref "refName" used on a non-ref value. It will not work in the production build.

I'm seeing messages like this in the console.

Template ref "shippingForm" used on a non-ref value. It will not work in the production build.


What does it mean?

As far as I can tell I'm following the docs instructions for adding template refs so I'm not sure what will not work in production?

Example,

<Shipping ref="shippingForm" />


type ShippingFormType = InstanceType<typeof Shipping>

const shippingFormRef = useTemplateRef<ShippingFormType>('shippingForm')


What am I missing?

Might add that I'm using this together with
defineExpose
from the
Shipping
component
Was this page helpful?