Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@convex-dev/react

Package Overview
Dependencies
Maintainers
1
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@convex-dev/react

React hooks for updating components based on changed in the Convex Cloud. This package is a layer on top of [@convex-dev/browser](https://docs.convex.dev/api/browser) which allows binding to React components. For convenience, it re-exports all of [@convex

  • 0.0.32
  • unpublished
  • npm
  • Socket score

Version published
Weekly downloads
0
Maintainers
1
Weekly downloads
 
Created
Source

@convex-dev/react

React hooks for updating components based on changed in the Convex Cloud. This package is a layer on top of @convex-dev/browser which allows binding to React components. For convenience, it re-exports all of @convex-dev/browser's exports too.

Convex is a platform for building dynamic applications without the complexity of managing a backend or interacting with a database. Data access functions run on the Convex Cloud platform and use the @convex-dev/server libraries to read and manipulate data. This package is used in frontend code to interact with these server-side functions.

Usage

Create a ConvexClient with the same approach as @convex-dev/browser. Then, instead of manually managing Query or Watch objects, seamlessly data bind with the useQuery hook.

import { ConvexClient } from "@convex-dev/react";

// Load the Convex config from its file inside your repository.
import convexConfig from "../convex.json";
const convex = new ConvexClient(convexConfig.origin):

export default function App() {
  const query = useQuery(convex.query("yourQuery"));
  // Render your component based on the query's return value.
}

See the Convex documentation to get started!

See Also

  • @convex-dev/server is the library used by Convex server functions to interact with data.
  • @convex-dev/browser is the layer below this package that provides a framework-independent SDK for data binding to Convex functions.
  • @convex-dev/cli is the CLI tool for spinning up Convex backends and syncing functions.

Keywords

FAQs

Package last updated on 17 Dec 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc