-
Hi, I wonder that it is ok to call For example, like below code. const Component = () => {
return <div className={css({ color: 'black', height: 400, ... })()}></div>;
} I noticed that version 0.1.x have a performance issue if I call const LargeComponent = () => {
return Array.from({ length: 10000 })
.map(() => <div className={css({ color: 'black', height: 400, ... })()}></div>);
} As it have been fixed now with version 0.2.0. (related issue: #535), I think there is no performance issue with my code. The reason why I tried write code like this, I think it is quite useful sometimes when I want put html with style together.(like using inline style prop). It's easy to check which element have which style directly. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Since |
Beta Was this translation helpful? Give feedback.
Since
0.2.0
this should be fine. As in, you'll get all the same caching benefits.