no $dispatch in vm
HengzheLi opened this issue · 1 comments
HengzheLi commented
I used below code to get a 'vm' object
const { contentItemId } = useParams();
const { vm, state } = useConnect(vmName, { PriceTickList: []})
// React.useEffect(()=>{
// vm.$dispatch({ Init: { contentItemId: contentItemId }})
// },[])
console.info(vm)
But there is no $dispatch property in the returned vm. Below is the printed content of vm
dsuryd commented
It should be listed under [[Prototype]]: Object
. And you should check that vm
is non-null before it's referenced.