Skip to content
Source
Sign inSign up
TanStack/router
Open History to see the last commit

using.tsx

10 lines329 Bytes

1const DummyPostResource = (postId: string) => ({
2 postData: { id: postId, title: 'dummy', body: 'dummy' },
3 [Symbol.dispose]: () => console.log('disposing!'),
4})
5export const Route = createFileRoute({
6 loader: ({ params: { postId } }) => {
7 using dummyPost = DummyPostResource(postId)
8 return dummyPost.postData
9 },
10})