BackboneJS: On vs. Bind vs. listenTo
Bind is just an alias for On. Then listenTo is a newer event system that doesn't force you to manually unbind (or off()) your handlers. Generally listenTo is what you want to use unless you have a good reason not to.
Written by mattcodez
Related protips
1 Response
nice. - thanks for the tip.
over 1 year ago
·
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Backbonejs
Authors
Did you know?
JavaScript on a page runs with the privileges of that origin. One altered library, tag manager, or snippet can read inputs, change what people see, and call your APIs as the user.
Security insights from Cside
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#