docs: `createLink` has no API reference page; 3 how-to guides link to a missing `#createlink` anchor #8766
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.mdline 822docs/router/how-to/integrate-material-ui.mdline 716docs/router/how-to/integrate-shadcn-ui.mdline 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:
- Add
docs/router/api/router/createLinkFunction.md, following the format of the other function pages. - List it under "Functions" in
docs/router/api/router.md. - Point the three how-to links to the new page.
I'd like to work on this and open a PR.
Complete minimal reproducer#
Steps to Reproduce the Bug#
- Open
docs/router/how-to/integrate-chakra-ui.mdand go to line 822 (the "Related Resources" section). The same link is inintegrate-material-ui.mdline 716 andintegrate-shadcn-ui.mdline 516. - See the link
[TanStack Router createLink API](../api/router#createlink). - Open
docs/router/api/router.md: there is nocreateLinkentry or heading in the Functions list. - 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
A-Raphie(GitHub profile, opens in a new tab) linked this to #8770
Sign in to join this conversation.