Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
More information about the deprecation of the unused `React.createMixin` helper

React.createMixin was never implemented

The React.createMixin helper was never actually implemented - the code for it simply took a mixin as an argument and returned it with no changes:

  createMixin: function(mixin) {
    // Currently a noop. Will be used to validate and trace mixins.
    return mixin;

Since mixins are considered harmful and we have no plans to support this API, it will be removed in React v16.0.

How to upgrade

If you were using React.createMixin then you can use the mixin directly. So change the following:

// BAD
const myMixin = React.createMixin(rawMixin);

to this:

const myMixin = rawMixin;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment