so that one can add state variables declaratively via attribute. Useful if a state is view related and so not all component of the same type should have same states. **Problem:** how do one define the update function?