Skip to content

Applying ThemeDecorator on a ES6 component eats my props #1803

@tjunnone

Description

@tjunnone

ThemeDecorator appears to swallow all custom properties set on a component.

Example:

@ThemeDecorator(ThemeManager.getMuiTheme(MyTheme))
class MyComponent extends React.Component {
    constructor(props) {
        console.log("Props:", props);
        super(props);
    }
}

Usage:

    <MyComponent myProp="foo"/>

Expected log output is "Props: Object {myProp: "foo"}", but when applying the ThemeDecorator to the component the output becomes simply "Props: Object {}".

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions