chore: vendor react-best-practices agent skill for cursor agents
CI / checks (push) Successful in 1m51s
CI / build (push) Successful in 3m34s

Adds the Vercel skill under .agents with famapp path patterns.

Includes skills-lock.json pin.
This commit is contained in:
ginnoir
2026-07-03 03:33:57 -05:00
parent 9c60b58947
commit 3d825fba20
138 changed files with 14153 additions and 0 deletions
@@ -0,0 +1,26 @@
---
title: Use Activity Component for Show/Hide
impact: MEDIUM
impactDescription: preserves state/DOM
tags: rendering, activity, visibility, state-preservation
---
## Use Activity Component for Show/Hide
Use React's `<Activity>` to preserve state/DOM for expensive components that frequently toggle visibility.
**Usage:**
```tsx
import { Activity } from "react";
function Dropdown({ isOpen }: Props) {
return (
<Activity mode={isOpen ? "visible" : "hidden"}>
<ExpensiveMenu />
</Activity>
);
}
```
Avoids expensive re-renders and state loss.