Overview
autobind-decorator
)
it binds methods to its class prototype + Compatible with stub/spy used on unit-test frameworks (Sinon.Js, enzyme,...so on) + Can be worked together with other 3rd party decorators (like Basic Example :
; @Autobind Component ;
Or
; Component MyComponent;
@Autobind decorator is more elegant than Autobind(...) function , However , Autobind(...) function is overloaded . Indeed, it accepts 2nd argument to rename the class after binding.
Example
; Component MyComponent'YourComponent';
From release 0.3.3
, it is possible to rename the class name from decorator too.
Example
; @ Component ;