Model.bind and model.on: Are these methods equivalent? Which one should I prefer?

I tried the following in my function initialiseinBackbone.View

this.model.bind('change', this.render, this);
this.model.on('change', this.render, this);

Apparently they work the same way.

Is this method equivalent. Which one should I prefer?

+3
source share
1 answer

Yes, they are equivalent. However, bind (and unbind) are stored only for backward compatibility. You must use it.

Hope this helps!

+6
source

All Articles