Rules
A component should not directly reference external variables
Why: It limits portability
Workflow: Pass in references in through data
Workflow: Move those variables into a store
A component should not directly reference external DOM elements
Why: It limits portability
Workflow: Adding/removing elem to/from the DOM should be done by parent components
Workflow: Pass in external elements in through data if you absolutely need to
A store's internal state is private and should be accessed via getter/setter functions
Why: Stores might need to do extra stuff in order to get/set things
Why: A store might not even be storing data (it might be proxying state from somewhere else)
Workflow: Create a getter function and a setter function for a given state variable right away when coding (it just keeps things flowing smoothly)
Next, Examples