Echo JS 0.11.0

<~>

planttheidea 2609 days ago. link 1 point
Or you could specify displayName on RadioButton and check that property instead. This value is not minified and has the added bonus of helping debug in devtools.
albertgao 2608 days ago. link 1 point
Thanks, I think this is much better compare to check that property name
MaxArt 2609 days ago. link 1 point
> child.type.name.toString() === 'RadioButton'

Well, relying on the name of a function/class when your building workflow minifies your code is indeed an unfortunate decision.

Moreover, it sounds like an attempt to use JavaScript in a classic OOP way. Your correction relies on duck typing instead, and it's more in line with JavaScript's nature, which mean not checking what an object *is*, but what an object *does*.
albertgao 2608 days ago. link 1 point
Thanks for pointing out this to me! So what's the best way to solve this? displayName as the other comment suggests? :)