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 (with the exception of elem)
Why: It limits portability
Workflow: Adding/removing elem to/from the DOM should be done externally
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
Workflow: Create a getter function and a setter function for a given internal state variable right away when coding
Next, Examples