I personally prefer not duplicating state. I'm sure Addy has an opinion on
that after writing a book about design pattern with backbone. :)
On Dec 14, 2013 3:24 PM, "Sindre Sorhus" <notifications@github.com> wrote:

> In architecture-examples/backbone/js/views/todo-view.js:
>
> > @@ -70,6 +71,14 @@ var app = app || {};
> >  			var value = this.$input.val();
> >  			var trimmedValue = value.trim();
> >
> > +			// We don't want to handle blur events from an item that is no
> > +			// longer being edited. Relying on the CSS class here has the
> > +			// benefit of us not having to maintain state in the DOM and the
> > +			// JavaScript logic.
> > +			if (!this.$el.hasClass('editing')) {
> > +				return;
> > +			}
>
> but wouldn't it be more idiomatic and better practise to store the state
> in the model, but not persist it?
>
> —
> Reply to this email directly or view it on GitHub<https://github.com/tastejs/todomvc/pull/746/files#r8351989>
> .
>