andreypopp/autobind-decorator
Decorator to automatically bind methods to class instances observed · 2026-08-28
Health v2 · maintenance only
32/100
- Activity 0
- Release rhythm 35
- Longevity 100
Flags: no_releases
How is this computed?
round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10) — computed 2026-09-02. Adoption (stars, forks) is never an input.
- gap_med: n/a
- age_days: 4162
- days_rel: n/a
- days_push: 1338
- n_releases_24m: 0
Adoption not part of the score
1444 stars · 65 forks observed · 2026-08-28
What it is AI-extracted, prompt v1, taxonomy v1, 2026-08-30, confidence not recorded
A JavaScript class and method decorator that automatically binds methods to class instances so `this` is always correct, even when methods are detached. It is commonly used in React components to avoid repeated `.bind(this)` calls when passing methods as event handlers.
Use cases
- bind react event handlers without .bind(this)
- automatically bind class methods to instances in javascript
- pass detached methods as callbacks while preserving this
- use decorators with babel or typescript to bind methods
- avoid binding methods in class component constructors
When to choose
- you use class-based React components and pass methods as props or handlers
- you want a small decorator-based solution with TypeScript typings included
- you already use Babel with legacy decorator support
When to avoid
- you use functional React components with hooks instead of classes
- your build setup does not support decorators (legacy or modern spec)
- you need a library under active development with frequent updates
Facets
library · maturity maintenance
middleware developer-tools web-development frontend developer-tools browser javascript-decorators this-binding react babel typescript nodejs javascript
2 sources
- readme: https://github.com/andreypopp/autobind-decorator · fetched 2026-08-28 · f207330624d1
- registry_npm: https://registry.npmjs.org/autobind-decorator · fetched 2026-08-29 · 909d9c698d01
Member repositories
| Repository | Role | Health v2 |
|---|---|---|
| andreypopp/autobind-decorator | main | 32 |
For agents
markdown · JSON · MCP: product_card(name="andreypopp/autobind-decorator")
Data as of 2026-08-30T08:39:29.467469+00:00 · Report a problem