-
-
Notifications
You must be signed in to change notification settings - Fork 3
New cache system #684
Copy link
Copy link
Open
Labels
enhancementNew feature or requestNew feature or request
Milestone
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request
Type
Fields
Give feedbackNo fields configured for issues without a type.
By default visage should encourage developers to memoize
stylesprop so it'd be better to makestylesprop immutable (uses ref to store the first reference to styles object and doesn't react to its changes). Also we can introduce a prop that says that the styles prop should be mutable ( default false ).Also cache needs to be simplified, now the code is terrible. With babel plugin we can cache everything much easier because styles are hoisted (the ones that can be). With immutable styles prop it's little bit harder because we still need to serialize styles to know their hash quickly. Maybe we could leverage some cache id counter that can be used instead, so we don't need to check for equality of object.