# react-mixin-helper

> A helper function that adds mixins to ES6 class using, well, React!

Latest version **1.0.1** (published 2015-06-04) · MIT license · 0 weekly downloads

> **Deprecated.** This package is deprecated.

## Install

```sh
npm install react-mixin-helper
pnpm add react-mixin-helper
yarn add react-mixin-helper
bun add react-mixin-helper
```

## Health

**Score 10/100 (F)** — status: deprecated.

Negative: deprecated.

## Facts

| | |
|---|---|
| Version | 1.0.1 |
| Published | 2015-06-04 |
| First published | 2015-06-04 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Known vulnerabilities | 0 (+1 in 1 direct dependencies) |
| Install scripts | no |
| Author | Jeremy Asuncion |
| Maintainers | codemonkey800 |
| Keywords | react, mixins, es6 |

## Links

- npm: https://www.npmjs.com/package/react-mixin-helper
- Repository: https://github.com/codemonkey800/react-mixin-helper
- Issues: https://github.com/codemonkey800/react-mixin-helper/issues
- npm.io page: https://npm.io/package/react-mixin-helper

## Dependencies (1)

- [react](https://npm.io/package/react.md) ^0.13.3

## Alternatives

- [mobx-react](https://npm.io/package/mobx-react.md) — 2.8M weekly downloads
- [rc-tree](https://npm.io/package/rc-tree.md) — 2.6M weekly downloads
- [@react-oauth/google](https://npm.io/package/@react-oauth/google.md) — 1.3M weekly downloads
- [@wagmi/connectors](https://npm.io/package/@wagmi/connectors.md) — 877.0K weekly downloads
- [vee-validate](https://npm.io/package/vee-validate.md) — 836.4K weekly downloads

## Recent versions

- 1.0.1 (latest) — 2015-06-04

## README

react-mixin-helper
==================
[![forthebadge](http://forthebadge.com/images/badges/fuck-it-ship-it.svg)](http://forthebadge.com)
[![forthebadge](http://forthebadge.com/images/badges/built-with-love.svg)](http://forthebadge.com)
[![forthebadge](http://forthebadge.com/images/badges/built-by-developers.svg)](http://forthebadge.com)
[![forthebadge](http://forthebadge.com/images/badges/built-with-swag.svg)](http://forthebadge.com)

This is a module providing mixin support for ES6 style classes. A lot of modules like this often accomplish mixin support by copying the properties over. The thing is, React already has a great mixin system that works! `React.createClass()` already returns an instance of `React.Component`, so the best way to accomplish mixin support is to extend an instance with the mixins already a part of it.

Example
=======
```js
import React from 'react/addons';
import mixin from 'react-mixin-helper';

let HelloWorldMixin = {
    helloWorld() {
        return 'Hello, World!';
    }
};

let AyyBrehLmaoMixin = {
    ayyBrehLmao() {
        return 'Ayy Breh Lmao';
    }
};

let SomeShitMixin = {
    addShit(a, b) {
        return a + b;
    }
};

class App extends mixin(HelloWorldMixin, AyyBrehLmaoMixin, SomeShitMixin) {
    constructor(props) {
        super(props);
    }

    render() {
        return (
            <div>
                <h1>{this.helloWorld()}</h1>
                <h1>{this.ayyBrehLmao()}</h1>
                <h1>{this.addShit(10, 20)}</h1>
            </div>
        );
    }
}
```
*This is literally from my `test.js` file*

LICENSE
=======
The MIT License (MIT)

Copyright (c) 2015 Jeremy Asuncion

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

---
_Source: https://npm.io/package/react-mixin-helper · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
