johnkueh/prosemirror-react-nodeviews

Receive updated node

Opened this issue · 0 comments

Great example repo, appreciate the starting point to using react nodes.

One issue I hit is that the component never receives any updated attributes. They only receive the default values. So if your nodeView is expected to update state, this will never happen by updating the attrs.

I worked around this by updating the this.node in reactNodeView on update, and using a callback to retrieve the node instead of passing in. That said, it isn't the most elegant solution and could use some investigation.