You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Provide an API for checking more specific components via Props and/or State.
For example:
letmaybeFC: React.FC<{foo: string}>|string=({foo})=><div>{`${foo}, I'm a function component!`}</div>;if(Math.random()>0.5){maybeFC='Not FC';}if(isFunctionComponent<{foo: string}>(maybeFC)){constfcWithProps: React.FC<{foo: string}>=maybeFC;constFCWithProps=fcWithProps;constfcWithPropsElem=<FCWithPropsfoo='bar'}/>; // should not have a type error
}else{constnotFC: string=maybeFC;}
The text was updated successfully, but these errors were encountered:
Provide an API for checking more specific components via Props and/or State.
For example:
The text was updated successfully, but these errors were encountered: