Cross-over between plugins

In a single page, there may be multiple copies of the same plugin. All these plugins share the same code. This means that it is possible for different copies of a plugin to interact with each other within a project.

A manifestation of this is if your plugin uses a global object. All the plugin importing from this file will hold the same reference which is likely not desirable.

To avoid this, simply make sure your code is encapsulated well. For example, by wrapping stores in classes and locating them in each plugin copy rather than the file.

Last updated