Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Shall I memoize() the sheet if the only vars changing are media-queries related. How to do it? #11

Closed
amarchen opened this issue May 23, 2016 · 1 comment

Comments

@amarchen
Copy link

I have zero global variables for stylesheets, yet quite some changes depending on the device orientation and thus on media queries.

Therefore I am calling create() on every rotation. How should I memoize() stylesheets in such a situation not to recalculate same sheet many times or is it possible at all?

@vitalets
Copy link
Owner

After implementing orientation support in #9 portrait/landscape styles will be cached automatically.
Memoize is intended for cases when you create components dynamically with set of styles.

@vitalets vitalets closed this as completed Mar 5, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants