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, context) {
super(props, context);
this.jss = this.context[ns.jss] || jss;
const { muiThemeProviderOptions } = this.context;
if (muiThemeProviderOptions) {
if (muiThemeProviderOptions.sheetsManager) {
this.sheetsManager = muiThemeProviderOptions.sheetsManager;
}
this.disableStylesGeneration = muiThemeProviderOptions.disableStylesGeneration;
}
// Attach the stylesCreator to the instance of the component as in the context
// of react-hot-loader the hooks can be executed in a different closure context:
// https://github.com/gaearon/react-hot-loader/blob/master/src/patch.dev.js#L107
this.stylesCreatorSaved = stylesCreator;
this.sheetOptions = {
generateClassName,
constructor(props, context) {
super(props, context);
this.disableStylesGeneration = false;
this.jss = null;
this.sheetOptions = null;
this.sheetsManager = sheetsManager;
this.stylesCreatorSaved = null;
this.theme = null;
this.unsubscribeId = null;
this.jss = context[ns.jss] || jss;
const {
muiThemeProviderOptions
} = context;
if (muiThemeProviderOptions) {
if (muiThemeProviderOptions.sheetsManager) {
this.sheetsManager = muiThemeProviderOptions.sheetsManager;
}
this.disableStylesGeneration = muiThemeProviderOptions.disableStylesGeneration;
} // Attach the stylesCreator to the instance of the component as in the context
// of react-hot-loader the hooks can be executed in a different closure context:
// https://github.com/gaearon/react-hot-loader/blob/master/src/patch.dev.js#L107
this.stylesCreatorSaved = stylesCreator;
constructor(props, context) {
super(props, context);
this.state = {};
this.disableStylesGeneration = false;
this.jss = null;
this.sheetOptions = null;
this.sheetsManager = sheetsManager;
this.stylesCreatorSaved = null;
this.theme = null;
this.unsubscribeId = null;
this.jss = this.context[ns.jss] || jss;
const { muiThemeProviderOptions } = this.context;
if (muiThemeProviderOptions) {
if (muiThemeProviderOptions.sheetsManager) {
this.sheetsManager = muiThemeProviderOptions.sheetsManager;
}
this.disableStylesGeneration = muiThemeProviderOptions.disableStylesGeneration;
}
// Attach the stylesCreator to the instance of the component as in the context
// of react-hot-loader the hooks can be executed in a different closure context:
// https://github.com/gaearon/react-hot-loader/blob/master/src/patch.dev.js#L107
this.stylesCreatorSaved = stylesCreator;
this.sheetOptions = _extends({
generateClassName
constructor(props, context) {
super(props, context);
this.jss = this.context[ns.jss] || jss;
this.sheetsManager = this.context.sheetsManager || sheetsManager;
this.stylesCreators = stylesCreators;
this.sheetOptions = {
generateClassName,
...this.context[ns.sheetOptions]
};
this.theme = themeListener.initial(context) || getDefaultTheme();
this.state = {};
}