Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions content/docs/api/error-handling-client.mdx
Original file line numberDiff line numberDiff line change
Expand Up@@ -132,7 +132,7 @@ async function parseApiError(response: Response): Promise<ObjectStackError> {

Map field-level errors from the API response directly to form fields:

```typescript
```tsx
import { useState } from 'react';

interface FormErrors {
Expand DownExpand Up@@ -304,7 +304,7 @@ function sleep(ms: number): Promise<void> {

Catch unexpected errors at the component tree level:

```typescript
```tsx
import { Component, type ReactNode } from 'react';

interface ErrorBoundaryState {
Expand Down
4 changes: 2 additions & 2 deletions content/docs/protocol/objectui/concept.mdx
Original file line numberDiff line numberDiff line change
Expand Up@@ -345,7 +345,7 @@ Authorization: Bearer <token>
```

**Renderer Logic (Simplified):**
```typescript
```tsx
function FormRenderer({ layout }) {
return (
<Form title={layout.title}>
Expand DownExpand Up@@ -644,7 +644,7 @@ A conformant ObjectUI renderer must:

Renderers maintain a mapping from JSON types to components:

```typescript
```tsx
const componentRegistry = {
text: TextFieldComponent,
email: EmailFieldComponent,
Expand Down
2 changes: 1 addition & 1 deletion content/docs/protocol/objectui/index.mdx
Original file line numberDiff line numberDiff line change
Expand Up@@ -315,7 +315,7 @@ Dashboard.create({

### 1. Declarative Over Imperative

```typescript
```tsx
// ❌ Imperative (React)
function TaskList() {
const [tasks, setTasks] = useState([]);
Expand Down
Loading
Loading