You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I just have a case where using JSS with a theme stored in Vuex is not possible.
In my case I need to compile a theme at the first instantiation of a component and save it in a static member for the futur instantiations. But as the Component decorator eats static function, this does not work.
@Component({
mixins: jss
})
export default class Badge extends Vue {
themeCompiler: Function = badge;
static styleSheet: Object;
get classes(): Object | null {
if (!Badge.styleSheet) {
Badge.styleSheet = jss.createStyleSheet(this.themeCompiler(this.jss.theme)); // jss is injected
Badge.styleSheet.attach();
return Badge.styleSheet.classes as Object; // does not work, styleSheet === undefined
} else return null;
}
}
Would it be possible to forward static members of a class ?
The text was updated successfully, but these errors were encountered: