Closed Satyam closed 10 years ago
Thanks for that catch! The working example had it wrong too. Fix pushed. I'm keeping an eye on your mithril-isomorphic.
And I'm keeping an eye on your components. I hope you don't mind.
I have already switched to your tabs component in mithril-isomorphic.
I'm pleased for you to use whatever's useful. BTW, I find the concept of mixins very useful for the app I'm working on.
I've been looking at the mixins and I'm really not sure what the solder
class is meant to do, it doesn't seem to be particularly useful, not much that cannot be done by simply instantiating those mixins and storing them anywhere you wanted. Unless it is doing something that escapes me, I think solder
simply adds mystery to something that is quite simple.
Solder allows the component to be tested by mocking out its dependencies. It also allows dependencies to be switched to something else with the same interface. Solder.extend lets you build a mixin which adds features to another mixin.
So basically Solder prevents modules from getting coupled too tightly. And, yes, its as magic as any dependency injection.
p.s. I created an issue to discussion occlusionController.
See: https://github.com/eddyystop/mithril-components/blob/master/components/tabs/readme#L53