Convex useQuery Not Updating in Real-Time
Convex useQuery
Not Updating in Real-Time
useQueryI'm building an npm package (
xerexjs) for real-time notifications in React/Next.js using Convex. The useQuery for fetching notifications requires a manual refresh instead of updating in real-time.Schema
Query Function
Client-Side Usage
Issue
- New notifications don't appear in real-time; they require a refresh.
-
console.log(notifications) inside useEffect only updates on refresh.Troubleshooting Steps Tried
- Restarting the dev server
- Clearing cache
- Checking Convex version (
v1.19.2)Question
Am I missing something to trigger real-time updates?
