function forEach(children, func) {
  var index = 0;
  external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.Children.forEach(children, function (child) {
    if (external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.isValidElement(child)) func(child, index++);
  });
}
Iterates through children that are "valid elements".

The provided forEachFunc(child, index) will be called for each
leaf child with the index reflecting the position relative to "valid components".