MCPcopy
hub / github.com/facebook/react / isSimpleFunctionComponent

Function isSimpleFunctionComponent

packages/react-reconciler/src/ReactFiber.js:310–316  ·  view source on GitHub ↗
(type: any)

Source from the content-addressed store, hash-verified

308}
309
310export function isSimpleFunctionComponent(type: any): boolean {
311 return (
312 typeof type === 'function' &&
313 !shouldConstruct(type) &&
314 type.defaultProps === undefined
315 );
316}
317
318export function isFunctionClassComponent(
319 type: (...args: Array<any>) => mixed,

Callers 1

updateMemoComponentFunction · 0.90

Calls 1

shouldConstructFunction · 0.70

Tested by

no test coverage detected