CO

Convex

convex

Client for the Convex Cloud

State Management
convex
database
react
state
serverless
State Management
javascript
npm
frontend
open source
Stars
12k
Weekly
1.0M
Open issues
218
Bundle
~25 kB

Installation

npm install convex

Code example

import { create } from "convex";

const useStore = create((set) => ({
  count: 0,
  inc: () => set((s) => ({ count: s.count + 1 })),
}));

export function Example() {
  const { count, inc } = useStore();
  return (
    <button type="button" onClick={inc}>
      Count: {count}
    </button>
  );
}

Pros & cons

Pros

  • Actively maintained by Convex, Inc.
  • 1.0M weekly downloads. Battle tested
  • First-class TypeScript definitions
  • Apache-2.0 licensed

Considerations

  • Adds roughly ~25 kB to your bundle
  • Needs client-only rendering in SSR frameworks
  • Not supported in React Native
  • 218 open issues on GitHub

FAQs

Alternatives & similar libraries