A collection of small React Component helpers
@pure
mark a Component as pure (perf)
; @pure // will add a default shouldComponentUpdate implementationComponent {}
@skinnable()
split logic and rendering (testability)
; @ // or @skinnable(mytemplate)Component { // logic here return name: thispropsusername; ; } { // rendering here return <p>localsname</p>; }
@skinnable(contains(Component))
wrap "template" components in a "smart/container" component
; const UserCard = <p>name</p>; @Component { // ...complex logic to obtain data... return name ; }