Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
constructor(props: P, context: ContextWithTheme) {
super(props, context);
this.state = { theme: themeListener.initial(context) };
}
componentDidMount() {
constructor(props: StyledElementPropsType, context: any) {
super(props, context)
if (!this.dynamicTagName && dynamicStyle) {
this.dynamicTagName = availableDynamicTagNames.pop() || generateTagName(tagName)
}
this.state = {}
if (context[channel]) {
this.state.theme = themeListener.initial(context)
}
this.staticClassName = staticClassName
}