Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save flarnie/60648c5fcb79aa7467685c4afbf7d877 to your computer and use it in GitHub Desktop.
Save flarnie/60648c5fcb79aa7467685c4afbf7d877 to your computer and use it in GitHub Desktop.
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:

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