Launch Week Day 5: Introducing Reachability for PHP.Learn More
Socket
Book a DemoSign in
Socket

@instantdb/react

Package Overview
Dependencies
Maintainers
4
Versions
2833
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@instantdb/react

Instant DB for React

latest
Source
npmnpm
Version
1.0.17
Version published
Weekly downloads
81K
3.46%
Maintainers
4
Weekly downloads
 
Created
Source

Shows the Instant logo

@instantdb/react

stars

Get Started · Examples · Docs · Discord

Welcome to Instant's React SDK.

// ༼ つ ◕_◕ ༽つ Real-time Chat
// ----------------------------------
// * Updates instantly
// * Multiplayer
// * Works offline

import { init, id } from '@instantdb/react';

const db = init({
  appId: process.env.NEXT_PUBLIC_APP_ID,
});

function Chat() {
  // 1. Read
  const { isLoading, error, data } = db.useQuery({
    messages: {},
  });

  // 2. Write
  const addMessage = (message) => {
    db.transact(db.tx.messages[id()].update(message));
  };

  // 3. Render!
  return <UI data={data} onAdd={addMessage} />;
}

Get Started

Follow the getting started tutorial to set up a live React app in under 5 minutes!

Questions?

If you have any questions, feel free to drop us a line on our Discord

FAQs

Package last updated on 24 Apr 2026

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