How to use the inferno-compat.render 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__ / styles.spec.jsx View on Github external
it('Should automatically add px suffix to whitelisted numeric style properties', () => {
    render(<div style="{{">foo</div>, container);

    expect(innerHTML(container.innerHTML)).toBe(innerHTML(`<div style="width: 10px; z-index: 1;">foo</div>`));
  });
github infernojs / inferno / packages / inferno-compat / __tests__ / misc.spec.jsx View on Github external
it('should export instance', () =&gt; {
      class App extends Component {
        render() {
          return null;
        }
        componentDidMount() {
          this.renderInner();
        }
        renderInner() {
          const wrapper = document.createElement('div');
          this.inner = unstable_renderSubtreeIntoContainer(this, , wrapper);
        }
      }
      const root = document.createElement('div');
      const app = render(, root);
      expect(typeof app.inner.getNode === 'function').toEqual(true);
    });
github infernojs / inferno / packages / inferno-compat / __tests__ / misc.spec.jsx View on Github external
it('should have isPropagationStopped and isDefaultPrevented defined in Event prototype', () =&gt; {
      const spyObj = {
        foo: event =&gt; {
          expect(event.isDefaultPrevented()).toBe(false);
          expect(event.isPropagationStopped()).toBe(false);

          event.preventDefault();
          expect(event.isDefaultPrevented()).toBe(true);

          event.stopPropagation();
          expect(event.isPropagationStopped()).toBe(true);
        }
      };
      spyOn(spyObj, 'foo').and.callThrough();

      render(<div>, container);

      container.firstChild.click();

      expect(spyObj.foo).toHaveBeenCalledTimes(1);
    });
  });</div>
github infernojs / inferno / packages / inferno-compat / __tests__ / ReactClass.spec.jsx View on Github external
function renderIntoDocument(input) {
    return React.render(createComponentVNode(VNodeFlags.ComponentClass, Wrapper, { children: input }), container);
  }
github infernojs / inferno / packages / inferno-compat / __tests__ / lifecycle.spec.jsx View on Github external
afterEach(function() {
    render(null, container);
    container.innerHTML = '';
    document.body.removeChild(container);
  });
github infernojs / inferno / packages / inferno-compat / __tests__ / ReactDOM.spec.jsx View on Github external
function renderIntoDocument(input) {
    return React.render(createComponentVNode(VNodeFlags.ComponentClass, Wrapper, { children: input }), container);
  }
github infernojs / inferno / packages / inferno-compat / __tests__ / warnings.spec.jsx View on Github external
afterEach(function() {
    render(null, container);
    container.innerHTML = '';
    document.body.removeChild(container);
  });
github infernojs / inferno / packages / inferno-compat / __tests__ / styles.spec.jsx View on Github external
afterEach(function() {
    render(null, container);
    container.innerHTML = '';
    document.body.removeChild(container);
  });
github infernojs / inferno / packages / inferno-compat / __tests__ / ReactDOM.spec.jsx View on Github external
afterEach(() => {
    React.render(null, container);
    container.innerHTML = '';
    document.body.removeChild(container);
  });
github infernojs / inferno / docs / uibench-inferno-compat / app.js View on Github external
function(state) {
      render(main(state), container);
    },
    function(samples) {