Saul-Mirone / prosemirror-adapter

Universal adapter to create prosemirror nodeview from modern UI frameworks.
MIT License
97 stars 7 forks source link

should `triggerRef` after `VuePluginView.updateContext` in`@prosemirror-adapter/vue` #34

Closed enpitsuLin closed 1 year ago

enpitsuLin commented 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


I just found one place, I think there might be such other things like this in this library

enpitsuLin commented 1 year ago

😢 my bad, the code seems to work properly, issue came from my side