
Security News
Axios Supply Chain Attack Reaches OpenAI macOS Signing Pipeline, Forces Certificate Rotation
OpenAI rotated macOS signing certificates after a malicious Axios package reached its CI pipeline in a broader software supply chain attack.
@dotdo/react
Advanced tools
React hooks and components for dotdo Durable Objects - real-time sync, live queries, and admin UI
React bindings for dotdo Durable Objects with real-time data synchronization.
npm install @dotdo/react @dotdo/client
# or
pnpm add @dotdo/react @dotdo/client
Peer dependencies: react >=18.0.0, zod >=3.0.0 (optional, for schema validation)
Wrap your app with the DO provider and use hooks to access real-time data:
import { DOProvider, useCollection } from '@dotdo/react'
function App() {
return (
<DOProvider url="wss://api.example.com.ai/ws">
<TaskList />
</DOProvider>
)
}
function TaskList() {
const { data: tasks, create, update } = useCollection('tasks')
return (
<ul>
{tasks.map(task => (
<li key={task.id} onClick={() => update(task.id, { done: !task.done })}>
{task.title}
</li>
))}
<button onClick={() => create({ title: 'New task', done: false })}>
Add Task
</button>
</ul>
)
}
| Hook | Description |
|---|---|
useCollection(name) | Subscribe to a collection with CRUD operations and optimistic updates |
useRecord(collection, id) | Subscribe to a single record by ID |
useLiveQuery(query) | Execute a live query with automatic re-subscription on changes |
useDO(namespace?) | Access the underlying Durable Object client |
use$() | Access the workflow context for event handling and scheduling |
useConnectionState() | Monitor WebSocket connection status |
const { data, create, update, remove, loading, error } = useCollection('users')
Returns real-time data with optimistic updates. Mutations are applied immediately and rolled back on failure.
const { data: user, update, remove, loading } = useRecord('users', userId)
Subscribe to a single record. Returns null if the record doesn't exist.
const { data, refetch } = useLiveQuery({
collection: 'orders',
where: { status: 'pending' },
orderBy: { createdAt: 'desc' },
limit: 10
})
const { connected, reconnecting, error } = useConnectionState()
| Entry Point | Description |
|---|---|
@dotdo/react | Main entry with DOProvider and all hooks |
@dotdo/react/hooks | Hooks only (for custom provider setups) |
@dotdo/react/tanstack | TanStack DB integration with CollectionOptions factory |
@dotdo/react/admin | Admin data provider (React Admin-inspired pattern) |
import { CollectionOptions } from '@dotdo/react/tanstack'
const usersCollection = CollectionOptions('users', {
schema: userSchema, // optional zod schema
})
import { createDataProvider } from '@dotdo/react/admin'
const dataProvider = createDataProvider({
url: 'wss://api.example.com.ai/ws',
})
MIT
FAQs
React hooks and components for dotdo Durable Objects - real-time sync, live queries, and admin UI
The npm package @dotdo/react receives a total of 46 weekly downloads. As such, @dotdo/react popularity was classified as not popular.
We found that @dotdo/react demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?

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.

Security News
OpenAI rotated macOS signing certificates after a malicious Axios package reached its CI pipeline in a broader software supply chain attack.

Security News
Open source is under attack because of how much value it creates. It has been the foundation of every major software innovation for the last three decades. This is not the time to walk away from it.

Security News
Socket CEO Feross Aboukhadijeh breaks down how North Korea hijacked Axios and what it means for the future of software supply chain security.