jayphelps/core-decorators — explained in plain English
Analysis updated 2026-06-26
Add @autobind to React component methods to avoid manual this-binding in constructors
Mark old methods with @deprecate to warn other developers they should stop using them
Use @readonly to prevent accidental reassignment of class properties at runtime
Mix reusable behaviors into a class with @mixin without changing its inheritance chain
| jayphelps/core-decorators | hotheadhacker/seedbox-lite | yomguithereal/react-blessed | |
|---|---|---|---|
| Stars | 4,497 | 4,498 | 4,499 |
| Language | JavaScript | JavaScript | JavaScript |
| Setup difficulty | moderate | moderate | moderate |
| Complexity | 2/5 | 3/5 | 3/5 |
| Audience | developer | general | developer |
Figures from each repo's GitHub metadata at analysis time.
Requires babel-plugin-transform-decorators-legacy, not compatible with modern decorators spec.
core-decorators is a JavaScript library that provides a set of ready-made decorators for use with classes and class methods. Decorators are a syntax feature that lets you attach behavior to a function or class by placing an annotation (starting with @) directly above it, similar to how annotations work in Java or Python. For example, placing @autobind above a method ensures that the method always refers to its own class instance even when passed around as a standalone function, a common headache in React development. Placing @readonly on a property prevents it from being reassigned. Placing @deprecate on a method logs a console warning when the method is called, signaling to other developers that they should stop using it. The full list of decorators in the library includes @autobind, @readonly, @override, @deprecate, @suppressWarnings, @nonenumerable, @nonconfigurable, @lazyInitialize, @time, @profile, and @mixin, among others. Several of these are marked as deprecated within the library itself because the scope has been narrowed over time. An important caveat is stated at the top of the README: this library was written against an early draft of the JavaScript decorators specification (stage-0) that has since changed in incompatible ways. The decorators proposal has moved to a substantially different stage-2 form. As a result, the README explicitly says the library should mostly be considered unmaintained and is probably best avoided for new projects. It will only receive security or critical fixes until the decorator specification stabilizes further. The library was designed to work with Babel 5 or with the babel-plugin-transform-decorators-legacy plugin. It does not officially support TypeScript. It has no framework dependency and was widely used in React and Angular projects during the period when this version of the decorator spec was common.
A JavaScript library of ready-made class decorators like @autobind and @readonly, but built against an outdated spec, best avoided for new projects in favor of modern alternatives.
Mainly JavaScript. The stack also includes JavaScript, Babel.
Setup difficulty is rated moderate, with roughly 30min to a first successful run.
Mainly developer.
This repo across BitVibe Labs
Verify against the repo before relying on details.