jayphelps/core-decorators

Memoize

Closed this issue · 4 comments

Closing due to @memoize now being deprecated and soon to be removed.

Hi,

any hint on why this was deprecated ? Just curious.

@pascalduez primarily two factors: it was never really complete to begin with--definitely slow, likely buggy, second is that you can now use third party functions as decorators via the new @decorate decorator described here. Libraries like lodash contain well supported memoization implementations that can now be used, as well as many others.

That said, this is certainly a community project so if there is a consensus on having memoization built-in, and someone champions the implementation, it could see a return.

Thanks for the explanations. Makes sense.
I found myself in need of such functionality a couple of times, that's why I asked.
At the end I used memoize-decorator.