How to use the adslot-ui.fastStatelessWrapper function in adslot-ui

To help you get started, we’ve selected a few adslot-ui 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 Adslot / adslot-ui / src / components / fastStatelessWrapper / index.spec.jsx View on Github external
it('should re-render on specified attribute change one level deep', () => {
    const GridFast = fastStatelessWrapper(Grid, ['mutable']);
    const props = {
      mutable: {
        one: true,
      },
      fixed: 'bar',
    };
    const nextProps = {
      mutable: {
        one: false,
      },
      fixed: 'bar',
    };
    const shallowRenderer = shallow();
    const shouldUpdate = shallowRenderer.instance().shouldComponentUpdate(nextProps);
    expect(shouldUpdate).to.equal(true);
  });

adslot-ui

Core component library. By Adslot

MIT
Latest version published 25 days ago

Package Health Score

70 / 100
Full package analysis