Anonymous Users via Sessions
Getting users to sign up for a new service before seeing any benefits is challenging. In this post, we looked at a couple of strategies for managing user information without requiring a login.
12 hours ago
Sessions: Wrappers as "Middleware"
How to implement session storage with Convex, using some helper functions we wrote. While most of your data is associated with a user or another document, sometimes you have data that is specific to a user’s browser tab, or associated with a user who isn’t logged in. Some of this data is stored on the client, such as in the browser’s `sessionStorage` or `localStorage`, while other data is stored on the server.
6 days ago
Zod Validation: Wrappers as “Middleware”
Function validation is important for a production app because you can’t always control which clients are talking to your server. See how to use zod to validate your Convex functions, using our withZod wrapper.
9 days ago
Edge to Butt: Wrappers as "Middleware"
Convex middleware serves many purposes. Sometimes authentication, sometimes i18n. This time? Making sense (or nonsense) of emerging technology industry trends.
13 days ago
Authentication: Wrappers as “Middleware”
Using wrapper functions like withUser can help you organize your code into middleware-like blocks that you can compose to keep your function logic concise.
13 days ago
Implementing Presence with Convex
Some patterns for incorporating presence into a web app leveraging Convex, and sharing some tips & utilities I built along the way.
24 days ago
Throttling Requests by Single-Flighting
For write-heavy applications, use single flighting to dynamically throttle requests. See how we implement this with React hooks for Convex.
2 months ago
Launching Features Right on Time: Feature Gating
Today we’re going to talk about how to flip features on and off remotely using a clever use of the reactive nature of Convex queries.
2 months ago
Managing Reactivity with useBufferedState
Reactivity has taken a dominant position today within web app development. Our components and app state are all reactive, and the world has adapted–most would argue, for the better. But has Convex gone too far? 😉 A new generation of serverless backends like Convex is recklessly spreading reactivity across our databases, server-side functions, and protocols, making global reactivity a new phenomenon. Shared global data is becoming reactive by default. Is this good for the world? In this video, Jamie Turner explores one circumstance where this pervasive reactivity poses a challenge, and he builds one useful abstraction for taming over-reactivity and turning it back into a strength.
5 months ago