Skip to content

No support for components that directly return null #926

Open
@rvetere

Description

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;
};

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Participants

    @rvetere

    Issue actions

      No support for components that directly return `null` · Issue #926 · reactjs/react-docgen