Skip to content

Combining with TanStack Router? #224

Answered by thruflo
superxiao asked this question in Q&A
Discussion options

You must be logged in to vote

Yup, this makes total sense and is something we'll be illustrating in the docs and examples.

You can see some existing discussions here: https://github.com/search?q=repo%3ATanStack%2Fdb+preload&type=issues

End goal is something like:

const query = createCollection(liveQueryOptions(...))

export default createFileRoute({
  loader: () => query.preload()
})

function Component () {
  const { data } = useLiveQuery(query)
}

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@superxiao
Comment options

@superxiao
Comment options

@KyleAMathews
Comment options

Answer selected by superxiao
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants