MCPcopy Create free account
hub / github.com/dozoisch/react-async-script / render

Method render

src/async-script-loader.js:174–186  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

172 }
173
174 render() {
175 const globalName = options.globalName;
176 // remove asyncScriptOnLoad from childProps
177 let { asyncScriptOnLoad, forwardedRef, ...childProps } = this.props; // eslint-disable-line no-unused-vars
178 if (globalName && typeof window !== "undefined") {
179 childProps[globalName] =
180 typeof window[globalName] !== "undefined"
181 ? window[globalName]
182 : undefined;
183 }
184 childProps.ref = forwardedRef;
185 return createElement(WrappedComponent, childProps);
186 }
187 }
188
189 // Note the second param "ref" provided by React.forwardRef.

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected