▲ noBind - A small utility to not more `bind` in JSX or any other context at github.com▼1 up and 0 down, posted by pizzaman 3019 days ago 2 comments
jaleksic 3019 days ago. link 2 points ▲ ▼Yep, always returns a new function, cause the component that uses the prop to rerender. This approach just moves a problem around, changing its semantics, without actually solving the problem. If you use babel anyway, the best way to go, IMO, is https://www.npmjs.com/package/autobind-decorator If you want more, you can use https://www.npmjs.com/package/javascript-decorators
moretti 3019 days ago. link 1 point ▲ ▼> .bind return a copy of the that bound function How is this different? A new function is returned on each invocation, just like .bind: https://github.com/RamonGebben/noBind/blob/master/index.js#L10