React Injext
This is just a WIP; it's usable, but I'll be adding proper documentation, tests and the build engine on the following weeks.
HOC
;;;; const MyComponent = { const dependencies: myService = props; return <button onClick= myService>Click Me!</button> ;} MyComponent;
The HOC support infinite number of items.
Named props were removed (for now) as they don't work after uglification.
Decorator (for services)
;; @ { myOtherService; } ;
This will add a static property called
inject
that the HOC will use to instantiate the dependencies and the service itself.
--
to be continued...