Netflix / x-element

A dead simple starting point for custom elements.
Apache License 2.0
28 stars 12 forks source link

Force observer and computed methods to be static #30

Closed theengineear closed 3 years ago

theengineear commented 5 years ago

This is related to #28. Also, it's potentially a nice way for us to remove a fork that may not be providing much benefit.

Benefits to making these static:

Downsides to making these static:

For computed... There's not too much argument here, there should be no need to provide a target. Forcing these methods to be static will also help with potential, future memoization of computations.

For observer... We want to support access to the target still, so we would need to change the signature to be myCallback(target, value, oldValue)--or something like that.

theengineear commented 5 years ago

@klebba , we discussed this at one point as a "funny, terrible idea". I still think the pros outweigh the cons here, but we should have more discussion before implementing.