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