Skip to content
Agentmart
Submit a tool

trove-react

React 19 coding conventions and performance patterns.

Skill by bravew

IndexedMIT★ 10
Write a review

Install

Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.

npx agentmarket install skill/bravew-trove-react-b3a05c

Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.

Get the weekly diff

The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.

We use your email only for this newsletter. Privacy

About

React 19 coding conventions and performance patterns. Auto-activates when working with React/TypeScript files. Covers hooks, state management, TanStack Query, Zustand, immutable updates, and component conventions. Use when: react component; react hooks; tanstack query; zustand state.

Use cases: frontend

No reviews yet. Installed it? Reviews come from verified installers only. How reviews work

Permissions

What this skill can do and what it asks for, from its SKILL.md and code. Checked Oct 25, 2026.

Tools
No tools found
Secrets
None asked for
Install scripts
None found

Network hosts it talks to 1

  • codeload.github.com · found in install command

Files it touches

  • ~/.claude/skills/trove-react

What's inside

Skill name
trove-react
Description
React 19 coding conventions and performance patterns. Auto-activates when working with React/TypeScript files. Covers hooks, state management, TanStack Query, Zustand, immutable updates, and component conventions. Use when: react component; react hooks; tanstack query; zustand state.
License
MIT
Instructions
82 lines in SKILL.md · view on GitHub

Files (1)

  • SKILL.md

SKILL.md (first lines)

<!-- AUTO-GENERATED from SKILL.md.tmpl — do not edit directly -->
<!-- Regenerate: bun run build:skills -->

## Session Init

This skill ships Trove conventions. Prefer existing project patterns over generic best practices when they conflict.

# React 19 Conventions

## Immutable State Updates (CRITICAL)

React StrictMode double-invokes state updaters. Mutating objects causes duplicated side effects.

```typescript
// BAD — mutation causes bugs in StrictMode
setMessages(prev => {
  prev[prev.length - 1].text += content; // MUTATION!
  return [...prev];
});

// GOOD — immutable update
setMessages(prev => {
  const updated = [...prev];
  const lastIndex = updated.length - 1;
  updated[lastIndex] = { ...updated[lastIndex], text: updated[lastIndex].text + content };
  return updated;
});
```

## Zustand Selectors (CRITICAL)

Always use selectors — never destructure the store directly:

```typescript
// BAD — subscribes to entire store, re-renders on ANY change
const { darkMode } = useGlobalStore();

// GOOD — subscribes only to darkMode
const darkMode = useGlobalStore(state => state.darkMode);

// GOOD — multiple values with useShallow
import { useShallow } from 'zustand/shallow';
const { username, email } = useUserStore(
  useShallow(state => ({ username: state.username, email: state.email }))
);
```

## Component Patterns

- Prefer function components with hooks
- Use `React.memo()` only when profiling shows re-render cost
- Extract custom hooks for reusable logic
- Keep components under 200 lines — split into sub-components

## TanStack Query

```typescript
// Queries — always provide staleTime
const { data, isLoading } = useQuery({
  queryKey: ['users', userId],
  queryFn: () => fetchUser(userId),
  staleTime: 5 * 60 * 1000,
});

// Mutations — invalidate related queries on success
const mutation = useMutation({
  mutationFn: updateUser,
  onSuccess: () => queryClient.invalidateQueries({ queryKey: ['users'] }),
});
```

## Error Boundaries

Wrap route-level components with error boundaries. Never let errors crash the full app.

## AI Gotchas

- **useEffect dependencies**: Always include all referenced values in the dependency array
- **Ref vs State**: Use `useRef` for values that don't trigger re-renders (timers, DOM refs)
- **Key prop**: Use stable, unique IDs — never use array index as key for dynamic lists
- **Event handlers**: Define inline only for simple logic; extract for complex handlers

From bravew/trove, MIT.

More from bravew/trove

Signals

Stars
10
Forks
1
Open issues
0
Last commit (this folder)
Sep 10, 2026 (1 month ago)
Last release
Oct 8, 2026 (21 days ago)

From GitHub (fetched Oct 24, 2026).

Details

License
MIT
First seen
Oct 24, 2026
Last checked
Oct 24, 2026

More from bravew

Cite this page

trove-react skill. Agent Mart. https://agentmart.dev/skills/bravew-trove-react-b3a05c (last updated 2026-10-24)