MCPcopy Create free account
hub / github.com/ampproject/amphtml / Component

Function Component

test/unit/preact/component/test-renderer.js:7–10  ·  view source on GitHub ↗
({data, render})

Source from the content-addressed store, hash-verified

5
6describes.sandboxed('useRenderer', {}, (env) => {
7 function Component({data, render}) {
8 const value = useRenderer(render, data);
9 return <div>{value}</div>;
10 }
11
12 it('should render a sync renderer', () => {
13 const render = env.sandbox.stub().callsFake((data) => data.value);

Callers

nothing calls this directly

Calls 1

useRendererFunction · 0.90

Tested by

no test coverage detected