Echo JS 0.11.0

<~>
MaxArt 41 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*.

Replies

albertgao 40 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? :)