Skip to content

Default props for inherited components not working in IE10 #6929

@joeporpeglia

Description

@joeporpeglia

Default props declared on a base class are not found by inheriting classes in IE10. This was observed in react 0.14.7 and 15.1.0. The example and codepen below should help reproduce.

http://codepen.io/anon/pen/zBxBwV?editors=0011

class TestBase extends React.Component {
  constructor(props) {
    super(props);
  }
}

TestBase.defaultProps = {
  message: 'this is a test message',
};

class Test extends TestBase {
  constructor(props) {
    super(props);
  }

  render() {
    return <div>{this.props.message}</div>;
  }
}

ReactDOM.render(
  <Test />,
  document.querySelector('main')
);

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions