andreypopp

andreypopp/autobind-decorator

Decorator to automatically bind methods to class instances

JavaScript
1451
66
MIT License

autobind-decorator is a JavaScript library that provides decorators for automatically binding class methods to their instances, ensuring the correct context for `this` even when methods are detached. It is particularly useful for React developers who frequently pass methods as event handlers, eliminating the need for manual `.bind(this)` calls. The library supports modern JavaScript environments and is compatible with Babel and TypeScript.

Total donated
Undistributed
Share with your subscribers: