Skip to content

docs: createLink has no API reference page; 3 how-to guides link to a missing #createlink anchor #8766

Open

Description

@ravitejas-tech

Which project does this relate to?

Router

Describe the bug

createLink is exported from @tanstack/react-router (packages/react-router/src/index.tsx), but it has no API reference page. Functions like createRoute, linkOptions and redirect each have a page listed in docs/router/api/router.md; createLink is not listed there, and no file under docs/router/api/ mentions it. It is only documented in the Custom Link guide (docs/router/guide/custom-link.md).

Three how-to guides link to it anyway, using an anchor that doesn't exist:

  • docs/router/how-to/integrate-chakra-ui.md line 822
  • docs/router/how-to/integrate-material-ui.md line 716
  • docs/router/how-to/integrate-shadcn-ui.md line 516

Each one is:
[TanStack Router createLink API](../api/router#createlink)

There is no createlink heading or entry in docs/router/api/router.md, so the link does not lead to any createLink documentation.

Proposed fix:

  1. Add docs/router/api/router/createLinkFunction.md, following the format of the other function pages.
  2. List it under "Functions" in docs/router/api/router.md.
  3. Point the three how-to links to the new page.

I'd like to work on this and open a PR.

Complete minimal reproducer

- [TanStack Router createLink API](../api/router#createlink) - API documentation for component integration

Steps to Reproduce the Bug

  1. Open docs/router/how-to/integrate-chakra-ui.md and go to line 822 (the "Related Resources" section). The same link is in integrate-material-ui.md line 716 and integrate-shadcn-ui.md line 516.
  2. See the link [TanStack Router createLink API](../api/router#createlink).
  3. Open docs/router/api/router.md: there is no createLink entry or heading in the Functions list.
  4. Search docs/router/api/ for "createLink": no results.

Expected behavior

The "TanStack Router createLink API" links lead to an API reference page for createLink, like the pages that exist for createRoute, linkOptions and redirect.

Screenshots or Videos

No response

Platform

N/A, documentation issue

  • Router version: main branch (commit d9b07e8)

Additional context

No response

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions