In my case, i try to port prosemirror 0.10 code where i had a plugin listening selectionChange
events, so the new plugin declare a onAction prop and checks action.type == "selection".
In the previous version i used to get the view from plugin’s initialization, and it could have been
possible to avoid that except for the above remark.