I have a class that has a class decorator added to it. Because of the decorator, the static methods and properties are not accessible. On trying to access the property getting undefined on the property.
@BackInTimeWrapper()
class BarChart2 extends React.Component {
static staticValues = {
events: ["seriesClick"],
};
render() {
return (<div>Sample</div>)
}
}
class NewChart extends React.Component<any> {
render() {
console.log("Static Props", BarChart2.staticValues); // getting undefined here
return (<BarChart2 {...this.props as any} />)
}
}
The same is happening for static methods as well. Should static variables not be used in a class that uses decorator ?