I want to get an output of useMemo result:
const output=useMemo(()=>{
let output=(async function () {
await getPlantInfoById(itemId)
.then(item => {
return item;
})
})();
return output;
},[itemId])
But when I track the output variable via inspect element:
console.log(output)
It prints pending.
Why? How to get a preferred result?