[Vuejs]-How to pass a Vue3 Ref variable by reference? (and what the missing "global" variable is)

-1👍

ref() takes the argument and returns it wrapped within a ref object with a .value property. The .value property of a ref is reactive.

Could you try changing the setupMqtt() function in TemperatureOutside.vue file:

const temperature = ref(-100);
setupMqtt('temperature', temperature.value);

Leave a comment