We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d135a1d commit bfa9cdbCopy full SHA for bfa9cdb
src/is-function-component/isFunctionComponent.ts
@@ -6,7 +6,7 @@ export const isFunctionComponent = (
6
): maybeFunctionComponent is React.FC => {
7
return (
8
typeof maybeFunctionComponent === 'function' &&
9
- /react.*createElement/i.test(String(maybeFunctionComponent)) &&
+ /\.default\.createElement/i.test(String(maybeFunctionComponent)) &&
10
!isClassComponent(maybeFunctionComponent)
11
);
12
};
0 commit comments