Sha256: d027e3a530341050aa83dbf6d451655dd11d059ececdf5ac42317c237ad01641
Contents?: true
Size: 773 Bytes
Versions: 93
Compression:
Stored size: 773 Bytes
Contents
module React module Children class << self def count(children) `Opal.global.React.Children.count(children)` end def for_each(children, &block) %x{ var fun = function(child) { #{block.call(child)}; } Opal.global.React.Children.forEach(children, fun); } end def map(children, &block) %x{ var fun = function(child) { return #{block.call(child)}; } return Opal.global.React.Children.map(children, fun); } end def only(children) `Opal.global.React.Children.only(children)` end def to_array(children) `Opal.global.React.Children.toArray(children)` end end end end
Version data entries
93 entries across 93 versions & 1 rubygems