hyper-react icon indicating copy to clipboard operation
hyper-react copied to clipboard

children method does not respond to empty?

Open catmando opened this issue 8 years ago • 3 comments

children.empty?

Seems to be just the way ruby works? perhaps there is a better way to define an enumerable?

catmando avatar Nov 02 '16 19:11 catmando

I think there is no reason to stop us from adding empty? to React::Children

zetachang avatar Nov 03 '16 09:11 zetachang

yeah I'm okay with that... but it seems odd. Perhaps there is a different way to create an enumerable we should be using? The reason I say that, is what else are we missing that we should be getting?

catmando avatar Nov 03 '16 18:11 catmando

Ruby's Enumerable doesn't provide empty? method, it got something similar which is any?.

zetachang avatar Nov 08 '16 10:11 zetachang