If the state has everything already (from new or loaded state), then setting a single value still results in a consistent view of the state. It's just a question of whether setting a single value should be done in setState or in a direct setter for that attribute. 

If setState should always set everything, I should probably move the defaults map from the constructor to setState. 

> On Mar 8, 2014, at 1:15 PM, stnguyen09 <notifications@github.com> wrote:
> 
> In Source/models/ProjectViewModel.js:
> 
> > @@ -135,8 +144,55 @@ define([
> >          };
> >      };
> >  
> > -    ProjectViewModel.prototype.setState = function(state) {
> > -        // TODO
> > +    ProjectViewModel.prototype.setState = function(state, availableWidgets) {
> > +        this._name = state.name;
> > +        this._workspace = new WorkspaceViewModel(state.workspace);
> > +        this._googleAnalytics = new GoogleAnalytics(state.analytics);
> > +
> > +        this._components = $.map(state.components, function(itemState) {
> I think setState should always set everything (even if values are empty). That way we always have a consistent view of the state. I’ll get around to reviewing this sometime this afternoon.
> …
> —
> Reply to this email directly or view it on GitHub.