{"library":"react-mixin","type":"library","category":null,"description":"react-mixin is a utility library designed to enable the use of traditional React mixins with ES6/TypeScript classes, addressing the absence of built-in support for this pattern in React's class-based components. While React itself has deprecated mixins in favor of Higher-Order Components and Hooks, this package serves as a specific migration path for legacy codebases that must integrate existing mixins with modern class syntax. The current stable version is 5.0.0, which notably adapted to React's `UNSAFE_` lifecycle methods. The library provides mechanisms to apply mixins to class prototypes for instance methods and to the classes themselves for static properties like `defaultProps` and `propTypes`. It differentiates itself by offering clear error handling for conflicting method names (instead of silent overwrites) and supporting an optional decorator syntax, allowing developers to manage mixins in a structured way within their class definitions. However, it explicitly advocates for avoiding mixins in new development.","language":"javascript","status":"deprecated","version":"5.0.0","tags":["javascript","react","mixin","es6","class","smart-mixin"],"install":[{"cmd":"npm install react-mixin","imports":["import reactMixin from 'react-mixin';","import reactMixin from 'react-mixin'; reactMixin.onClass(MyClass, myMixin);","import toUnsafe from 'react-mixin/toUnsafe';","import reactMixin from 'react-mixin'; @reactMixin.decorate(myMixin) class MyClass {}"]},{"cmd":"yarn add react-mixin","imports":[]},{"cmd":"pnpm add react-mixin","imports":[]}],"homepage":null,"github":"https://github.com/brigand/react-mixin","docs":null,"changelog":null,"pypi":null,"npm":"https://www.npmjs.com/package/react-mixin","openapi_spec":null,"status_page":null,"smithery":null,"compatibility":{"summary":{"python_range":"18–22","success_rate":0,"avg_install_s":null,"avg_import_s":null,"wheel_type":null},"url":"https://checklist.day/v1/registry/react-mixin/compatibility"},"provenance":{"verified_status":null,"verified_at":null,"last_verified":"Wed Jun 17","next_check":"Fri Jul 24","install_tag":null}}