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 got that merging style and theme objects has following logic.
conststyle={a: 'xxx'};consttheme={a: 'yyy'};themeable(style,theme);// the result is {hello: "xxx yyy"}consttheme2={a: 'xxxzzz'};themeable(style,theme2);// the result is {hello: "xxxzzz"}
so in first themeable call - classes are combined together but in the second call the theme class wins.
The only situation I see it's needed is to avoid class duplication if theme and style are the same css-module class names - and this will not work in all cases.
const style = { a: 'xxx aaa'};
const theme = { a: 'xxx zzz'};
themeable(style, theme); // the result is {hello: "xxx aaa xxx zzz"} xxx is duplicated
Is any other behaviors why it's needed? Please help to get the logic of this.