Re:Using ES7 Decorators as Mixins
by mikewhy on Friday June 26, 2015 @06:29PM
(#9788123)
I haven't seen that usage for higher-order components before. This is the pattern I've been following:
as explained here: https://medium.com/@dan_abramov/mixins-are-dead-long-live-hi...
[ Parent
| on HN ]
They are the same I think, only one has extra parameters. At least in Python, @fn(...args) evaluates the function first and uses the result as a decorator. The guy who wrote the blog post you mention actually uses the parent's pattern in react-dnd.