How to use the inferno-compat.Children function in inferno-compat

To help you get started, we’ve selected a few inferno-compat examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github infernojs / inferno / packages / inferno-compat / __tests__ / ReactChildren.spec.jsx View on Github external
it('ForEach should not fail if null children is provided', () => {
    expect(React.Children.forEach(null, null, null)).toBe(undefined);
  });
github infernojs / inferno / packages / inferno-compat / __tests__ / onlyChild.spec.jsx View on Github external
beforeEach(function() {
    onlyChild = React.Children.only;
    WrapComponent = React.createClass({
      render: function() {
        return <div>{onlyChild(this.props.children, this.props.mapFn, this)}</div>;
      }
    });
  });
github infernojs / inferno / packages / inferno-compat / __tests__ / ReactComponent.spec.jsx View on Github external
render: function() {
        return React.Children.only(this.props.children);
      }
    });