Suppose you have a ProseMirror text editor inside a React UI. Now you are writing a ProseMirror plugin, but you need access to some state from outside of ProseMirror, like from React or Redux. How do you have access to the latest values of that state without killing performance? …