I'm implementing a store/state pattern in my plain JS project as it exists in Vue and I have some DOM elements that the various controllers (MVC model) need to access.
Is it a good idea to put them in the state object, inside state.runtime for example? As I understand, the state object must be plain JS object, and shouldn't contain functions or class instances (DOM Nodes), but I can't think of a better place to put those objects, because they need to be shared across multiple scripts.