News for hackers. Stuff that matters.
Re:Show HN: HyperApp – 1k JavaScript framework for building ... by davegauer on Tuesday May 22, 2018 @08:58PM (#17130749)
True, but by passing the same object as an attribute to a pair of Mithril components, I can have them share state. (Can be restricted to the scope of a parent component if desired.) Is there an additional requirement for compound components?
Re:Show HN: HyperApp – 1k JavaScript framework for building ... by dsego on Wednesday May 23, 2018 @03:26AM (#17132000)
There isn't a built-in way to detect type of component. It would be useful when you want a parent component to encapsulate certain logic/behavior but not hard-code the presentation. I know there's name() but it only works if my component is a function. Otherwise I think I need to assign some special identifier, which sucks.

You can see a great presentation of the technique in this video: https://youtu.be/hEGg-3pIHlE