#Usage with Tanstack libraries

9 messages · Page 1 of 1 (latest)

steady basin
#

Does Convex work with or have plans to integrate with certain tanstack libraries like DB?

queen flumeBOT
#

Hi @steady basin. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave:

#

Convex currently has deep integrations with TanStack Start, TanStack Router, and TanStack Query.

TanStack Start & Router

Convex provides first-class support for TanStack Start, enabling server-side rendering (SSR) with live-updating queries [TanStack Start]. You can use useSuspenseQuery to render Convex query results on the server initially, which then transition to live subscriptions in the browser [TanStack Start Quickstart].

TanStack Query

The @convex-dev/react-query library provides a ConvexQueryClient that adapters Convex to TanStack Query [Convex with TanStack Query]. This allows you to use useQuery while maintaining Convex's reactive, push-based data updates instead of traditional polling [Convex with TanStack Query].

Regarding "TanStack DB"

The knowledge sources do not mention a specific "TanStack DB" library or any official plans to integrate with one.

However, there is community discussion regarding migrating from Convex's built-in database to other tools like Drizzle ORM within a TanStack Start environment if a user chooses to move away from Convex's managed backend [How hard is it to migrate AWAY from Convex?]. Generally, Convex serves as the database and backend state management system itself, which is why it integrates at the framework (Start) and data-fetching (Query) layers rather than with an external database library.

#

@steady basin Kapa.ai is still learning and improving, please let me know how I did by reacting below.

steady basin
#

@queen flume running npx convex dev and trying to use local deployment errors with github api 502

queen flumeBOT
#

Let me check the knowledge base for you again. One moment! :books:

#

I'm sorry, but the provided knowledge sources do not explicitly mention a GitHub API 502 error. They do, however, mention a GitHub API 403 (Rate Limit Exceeded) error occurring when attempting to run local deployments with npx convex dev [Strange github rate limit; Unable to develop locally].

The Convex CLI fetches binaries for the open-source local backend from GitHub releases. If you are experiencing API errors during this process, the following information from the knowledge sources may be relevant:

#
  • GitHub Rate Limiting: The CLI makes unauthenticated requests to the GitHub API to download the local backend. If your IP address has made too many requests, GitHub may return an error [Strange github rate limit].
  • Workaround (VPN): Using a different IP address via a VPN or tunneling your traffic can sometimes resolve issues where GitHub is blocking or limiting your current connection [Strange github rate limit].
  • Manual Setup: If the automated download fails, you can manually download the convex-local-backend binary for your OS and architecture from the Convex backend releases and run it yourself [Developing with the Open-Source backend].
  • Disable Local Deployments: If the local setup continues to fail and you wish to return to cloud development, you can run:
    npx convex disable-local-deployments
    
    [Unable to develop locally; Local Deployments]

If the error persists and is specifically a 502 (Bad Gateway), it may indicate a temporary issue with GitHub's infrastructure or your local network proxy.

Note: you can ask me a follow up question by @ mentioning me again :speech_balloon: