[Vuejs]-Vue is not updating the values of esri map

0👍

import { reactive, computed } from "vue";

const mapObject = reactive({
  lat: 0,
  long: 0,
});

const esriObject = computed(() => {
  return [mapObject.lat, mapObject.long];
});

export const useEsriMap = () => {
  const panTo = (lat, long) => {
    mapObject.lat = lat;
    mapObject.long = long;
  };

  return {
    panTo,
    esriObject,
  };
};

codesandbox

Leave a comment