Closed enpitsuLin closed 1 year ago
const { view } = usePluginViewContext() const somePropDeep = computed(()=>view.value.state.select)//or other things
Vue can't track the effect of somePropDeep when view was shallowRef, we should use triggerRef manually after assigned https://github.com/Saul-Mirone/prosemirror-adapter/blob/c47e19955d1a611cdb24724c4055a3001fb087f0/packages/vue/src/pluginView/VuePluginView.tsx#L31
somePropDeep
shallowRef
triggerRef
I just found one place, I think there might be such other things like this in this library
😢 my bad, the code seems to work properly, issue came from my side
Vue can't track the effect of
somePropDeep
when view wasshallowRef
, we should usetriggerRef
manually after assigned https://github.com/Saul-Mirone/prosemirror-adapter/blob/c47e19955d1a611cdb24724c4055a3001fb087f0/packages/vue/src/pluginView/VuePluginView.tsx#L31I just found one place, I think there might be such other things like this in this library