Skip to content

Functions on statics get chained with duplicate keys? #1947

Closed
@sophiebits

Description

@sophiebits

This logs both a and b:

var M = {
  statics: {
    moo: function() { console.log('a'); }
  }
};

var X = React.createClass({
  mixins: [M],
  statics: {
    moo: function() { console.log('b'); }
  },
  render: function(){}
});

X.moo();

This seems weird to me and inconsistent with the behavior for non-static functions. Can we change this to give an error too?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions