Currently node view has a destroy method. It would be good to support this method in mark views too.
We are using React to render nodes and marks. Particularly, we’re using React’s createPortal
API to render a React component inside the contentDOM element of a node/mark view. When the node/mark view is destroyed, we need to notify React to unmount the corresponding React component and clean up some side effects. This isn’t possible when using mark views.