convex-realtime

Solid

Patterns for building reactive apps including subscription management, optimistic updates, cache behavior, and paginated queries with cursor-based loading

Web & Frontend 401 stars 30 forks Updated 3 months ago Apache-2.0

Install

View on GitHub

Quality Score: 86/100

Stars 20%
87
Recency 20%
50
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
50
License 10%
100
Description 5%
100

Skill Content

# Convex Realtime Build reactive applications with Convex's real-time subscriptions, optimistic updates, intelligent caching, and cursor-based pagination. ## Documentation Sources Before implementing, do not assume; fetch the latest documentation: - Primary: https://docs.convex.dev/client/react - Optimistic Updates: https://docs.convex.dev/client/react/optimistic-updates - Pagination: https://docs.convex.dev/database/pagination - For broader context: https://docs.convex.dev/llms.txt ## Instructions ### How Convex Realtime Works 1. **Automatic Subscriptions** - useQuery creates a subscription that updates automatically 2. **Smart Caching** - Query results are cached and shared across components 3. **Consistency** - All subscriptions see a consistent view of the database 4. **Efficient Updates** - Only re-renders when relevant data changes ### Basic Subscriptions ```typescript // React component with real-time data import { useQuery } from "convex/react"; import { api } from "../convex/_generated/api"; function TaskList({ userId }: { userId: Id<"users"> }) { // Automatically subscribes and updates in real-time const tasks = useQuery(api.tasks.list, { userId }); if (tasks === undefined) { return <div>Loading...</div>; } return ( <ul> {tasks.map((task) => ( <li key={task._id}>{task.title}</li> ))} </ul> ); } ``` ### Conditional Queries ```typescript import { useQuery } from "convex/react"; import { api } from "../convex/_g...

Details

Author
waynesutton
Repository
waynesutton/convexskills
Created
4 months ago
Last Updated
3 months ago
Language
JavaScript
License
Apache-2.0

Integrates with

Similar Skills

Semantically similar based on skill content — not just same category