LocalData / localdata-dashboard

BSD 3-Clause "New" or "Revised" License
13 stars 6 forks source link

Standardize `render` return values #470

Open hampelm opened 9 years ago

hampelm commented 9 years ago

Many use return this, and a number use return this.$el. The former is more flexible. I could argue that this.$el is more consistent with what we'd expect from render.

prashtx commented 9 years ago

return this is the convention documented in the Backbone docs: http://backbonejs.org/#View-render

It also encourages us to work with the View as the primary object rather than the DOM, since we ideally shouldn't be doing a lot of cross-view DOM manipulation.