Open kof opened 6 years ago
👍
WeakMap can't be used inside plugin-syntax-rule-value-function because a WeakMap needs objects as keys.
Function is an object, can be used as a key
Ohh yeah, so the function would be the keys and the actual css prop name would be the value in the WeakMap
@HenriBeck I think we can close this one, no?
No, not yet, we haven't converted the function plugin to use it.
We are using in many cases some property directly on an object/function when we need to associate a value with that object. I think WeakMap support is good enough now that we can start using it and assume people will include a WeakMap polyfill for older browsers.
I think React is also using WeakMap.
Todo