# es6-react-mixins **Repository Path**: mirrors_fis-components/es6-react-mixins ## Basic Information - **Project Name**: es6-react-mixins - **Description**: Fork from https://github.com/angus-c/es6-react-mixins.git - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2020-08-08 - **Last Updated**: 2026-07-18 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # es6-react-mixins [](http://travis-ci.org/angus-c/es6-react-mixins) [](https://npmjs.org/package/es6-react-mixins) `es6-react-mixins` is a module that lets you augment your ES6 React component classes with any number of custom ES6 mixins. You can also use it to merge traditional pre-ES6 React mixin objects into your ES6 React classes. Inspired by [this gist](https://gist.github.com/sebmarkbage/fac0830dbb13ccbff596) by [Sebastian Markbåge](https://github.com/sebmarkbage) the strategy is transient class hierarchies – instead of locking classes into permanent *is a* roles, class realtionships are assembled and re-assembled at will. ES6 mixins are functions that return classes. The `base` parameter is used internally to construct the mixin chain. There's no need to extend `React.component`, you get that for free. ```js const es6Mixin = base => class extends base { componentWillMount() { console.log("augmented componentWillMount"); } render() { console.log("augmented render"); } }; ``` React components invoke mixins with a call to `super`. ```js import mixin from 'es6-react-mixins'; import React from 'react'; class MyComponent extends mixin(es6Mixin) { componentWillMount() { super.componentWillMount(); } render() { super.render(); return