MCPcopy Create free account
hub / github.com/react/react / injectFixture

Function injectFixture

fixtures/dom/public/renderer.js:141–154  ·  view source on GitHub ↗
(src)

Source from the content-addressed store, hash-verified

139 }
140
141 function injectFixture(src) {
142 Fixture = new Function(src + '\nreturn Fixture;')();
143
144 if (typeof Fixture === 'undefined') {
145 setStatus('Failed');
146 output.innerHTML = 'Please name your root component "Fixture"';
147 } else {
148 prerender().then(function () {
149 if (getBooleanQueryParam('hydrate')) {
150 render();
151 }
152 });
153 }
154 }
155
156 function reloadFixture(code) {
157 renders = 0;

Callers 1

reloadFixtureFunction · 0.85

Calls 5

setStatusFunction · 0.85
getBooleanQueryParamFunction · 0.85
prerenderFunction · 0.70
renderFunction · 0.70
thenMethod · 0.65

Tested by

no test coverage detected