Skip to content

Commit

Permalink
docs: Fix notFound import (#3133)
Browse files Browse the repository at this point in the history
  • Loading branch information
jeffhertzler authored Jan 9, 2025
1 parent e592687 commit c99a4be
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion docs/framework/react/start/server-functions.md
Original file line number Diff line number Diff line change
Expand Up @@ -627,7 +627,8 @@ While calling a server function from a `loader` or `beforeLoad` route lifecycle,
To throw a notFound, you can use the `notFound` function exported from the `@tanstack/react-router` package:

```tsx
import { createServerFn, notFound } from '@tanstack/start'
import { notFound } from '@tanstack/react-router'
import { createServerFn } from '@tanstack/start'

const getStuff = createServerFn({ method: 'GET' }).handler(async () => {
// Randomly return a not found error
Expand Down

0 comments on commit c99a4be

Please sign in to comment.