بنقرة واحدة
react
How to use React. Use when working on a React codebase.
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
القائمة
How to use React. Use when working on a React codebase.
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
استنادا إلى تصنيف SOC المهني
Author a teach workspace's lessons/reference/index in markdown and build both the browsable HTML site and a phone-friendly EPUB from that one source.
A relentless interview that asks every frontier question at once, round by round.
Break a plan, spec, or the current conversation into a set of tracer-bullet tickets, each declaring its blocking edges, published to the configured tracker — edges as text in one file per ticket locally, or native blocking links on a real tracker.
Print the relevant text as raw copy-able markdown and copy it to the clipboard. Run `/markdown file` to copy it as a file reference instead, for pasting into Slack.
Move issues and external PRs through a state machine of triage roles — categorise, verify, grill if needed, and write agent-ready briefs.
Review the changes since a fixed point (commit, branch, tag, or merge-base) along two axes — Standards (does the code follow this repo's documented coding standards?) and Spec (does the code match what the originating issue/PRD asked for?). Runs both reviews in parallel sub-agents and reports them side by side. Use when the user wants to review a branch, a PR, work-in-progress changes, or asks to "review since X".
| name | react |
| description | How to use React. Use when working on a React codebase. |
Based on Vercel Agent Skills
await into the branch that uses the result; don't block
early-return paths.Promise.all() — never await independent operations sequentially; run them
concurrently.Promise.all() at the end:
const userPromise = fetchUser()
const profilePromise = userPromise.then((u) => fetchProfile(u.id))
const [user, config, profile] = await Promise.all([userPromise, fetchConfig(), profilePromise])
<Suspense> so layout
renders immediately. Share promises across sibling components via use().lucide-react/dist/esm/icons/check)
instead of barrel re-exports. Barrel imports can load 1,500+ modules.React.lazy / next/dynamic with { ssr: false }
for large components (editors, charts).import() on onMouseEnter/onFocus to reduce perceived
latency.import() large data/modules only when a feature is activated."use server" functions as public endpoints; always
verify auth + authorization inside each action.React.cache() — wrap DB queries/auth checks; avoid inline objects as
args (uses Object.is).after() for non-blocking ops — schedule logging/analytics after the response is sent.{ passive: true } to touch/wheel listeners that don't call
preventDefault().useSWRSubscription)
instead of N listeners for N component instances.setState updates — setState(prev => ...) avoids stale closures and removes
state from dependency arrays.useState(() => expensive()) runs only once; without the arrow,
it runs every render.useMemo/useEffect with independent deps so
they recompute independently.useMediaQuery('(max-width:767px)') instead of subscribing
to continuous width changes.const NOOP = () => {} as default prop
for memo()'d components.useRef for transient values — mouse position, interval IDs, flags that shouldn't trigger
re-renders.useDeferredValue for expensive derived renders — keeps input responsive while heavy
computation catches up.startTransition for non-urgent updates — marks frequent state updates (scroll, resize) as
interruptible.content-visibility: auto — skip layout/paint for off-screen items in long lists (10×
faster initial render for 1000 items).<Activity mode="visible|hidden"> — React API to preserve state/DOM for toggled components.defer/async on scripts — never block HTML parsing with synchronous script tags.? :) not && when condition can be 0 or
NaN.prefetchDNS, preconnect, preload, preinit for critical
resources.<script> to read localStorage before React
hydrates.Set/Map for O(1) lookups — convert arrays to Set for repeated .includes() checks..find() by key — new Map(users.map(u => [u.id, u])).flatMap to map+filter in one pass — arr.flatMap(x => x.valid ? [x.value] : []).toSorted() over sort() — immutable sorting; .sort() mutates arrays which breaks React
state.a.length !== b.length.for..of loop instead of chained .filter()
calls.useMemo; don't recreate in render.localStorage/sessionStorage/cookies are sync & expensive; cache
in memory.didInit guard for one-time setup (auth,
storage load).useEffectEvent — stable callback ref that always calls latest handler without adding to
effect deps.<Composer isThread isEditing isDMThread>, create explicit variants: <ThreadComposer>,
<EditComposer>, <ForwardComposer>.const Composer = {
Provider: ComposerProvider,
Frame: ComposerFrame,
Input: ComposerInput,
Submit: ComposerSubmit,
Footer: ComposerFooter,
}
Consumers compose exactly what they need; no hidden conditionals.interface ComposerContextValue {
state: ComposerState
actions: ComposerActions
meta: ComposerMeta
}
<ThreadComposer>, <EditMessageComposer>,
<ForwardMessageComposer> instead of one component with boolean flags. Each variant is
self-documenting about what provider, UI elements, and actions it uses.children compose naturally and are more readable. Use
render props only when the parent needs to pass data back to the child (e.g., renderItem in a
list).forwardRef — ref is a regular prop in React 19.use() replaces useContext() — and can be called conditionally.<Flex> over <Box display="flex"><Button> ov