reactjs/react-docgen

No support for components that directly return `null`

rvetere opened this issue · 0 comments

If a component directly returns null like this:

export const DataTableColumnDocs: FunctionComponent<
  IDataTableColumn<object>
> = () => {
  return null;
};

Then it won't find any interface to parse. The same behavior can be seen when a component directly returns a prop like so:

export const AuthenticatedBoundary = ({
  children,
  fallback,
}: AuthenticatedBoundaryProps) => {
  const { isLoggedIn } = useAuthentication();

  if (!isLoggedIn) {
    return fallback;
  }

  return children;
};