A state module for subview.js