So, I can make a plugin that defines a PluginKey. However, I don't get how I then use this key... If my plugin is named "myPlugin", how do I retrieve it from the state or view?
With the key object's get method, or getState to get the state value associated with the plugin.
If I have to pass the PluginKey object around, what advantage does that give over just passing around the plugin and using plugin.getState ?
None, if your plugin is a singleton. If it's initialized by some factory function you might not have easy access to the precise instance.