Loading...
Loading...
Opinionated React and TypeScript conventions for JSX, hooks, routing, shared state, and query wiring. Use for style cleanups, refactors, review feedback, or code generation.
npx skill4agent add gwitchr/skills pedantic-reactimport typeinterfacePropsWithChildrenReadonly<...>unknownany!@/src/const showBanner = isLoaded && hasError && !isDismissedshowBanner ? <Banner /> : null[a, b, c].every(Boolean)[a, b, c].some(Boolean)&&||ifcondition ? <Thing /> : nullcondition && <Thing />{' '}{" "}const handleSubmit = async () => { ... }onClick={async () => { ... }}voidvoid handleSubmit()export functionprops.foouseEffectuseEffect| Problem | Prefer instead |
|---|---|
| Derived value from state or props | Compute inline during render; |
| Fetching data | TanStack Query |
| Resetting state when a prop changes | |
| Syncing with an external store | |
| DOM measurements before paint | |
| Triggering animations | |
useEffectuseEffectqueryOptions(...)query/api/fetchsrc/types/onMutateonErrornull&&if[].every(Boolean)[].some(Boolean){' '}{" "}voiduseEffectuseMemouseLayoutEffectuseSyncExternalStore@/import type