[Vuejs]-Any alternative to useLazyAsyncData and watch() to post process a string?

1👍

You could add immediate:true to call the watch at the first data change :

const reportData = reactive({json:{}});

watch(report, (newReport) => {
  console.log("watch() called");
  reportData.json = JSON.parse(newReport);
},{immediate:true});

Leave a comment