Backbone 0.9.9: Difference between listenTo and on

When you create a view, both listenTo and on add event handling. However, when the view is destroyed, the listenTo call will automatically remove the event handler. This prevents memory leaks and zombie event listeners.

So, use on if you want to manage the handler yourself. Just make sure to call off. Otherwise, call listenTo.

Leave a Comment