React
๐ ๏ธ ์์ด์ ํธ ์คํฌ
npx -y skills add DaleStudy/skills --skill reactAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
One thing to look at
- 4 stars4 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
What its author says it does
Copied from the file, not written here
React ์ฑ๋ฅ ์ต์ ํ ๋ฐ ๋ฒ ์คํธ ํ๋ํฐ์ค ์คํฌ. Vercel Engineering ๊ฐ์ด๋ ๊ธฐ๋ฐ, ํ๋ ์์ํฌ ๋น์ข ์. ๋ค์ ์ํฉ์์ ์ฌ์ฉ: (1) React ์ปดํฌ๋ํธ(.tsx, .jsx) ์์ฑ ๋๋ ์์ ์, (2) ์ํ ๊ด๋ฆฌ, hooks, ๋ฆฌ๋ ๋๋ง ์ต์ ํ ์์ ์, (3) ๋น๋๊ธฐ ๋ฐ์ดํฐ ํ์นญ ๋๋ Suspense ํจํด ์์ ์, (4) ๋ฒ๋ค ์ฌ์ด์ฆ ์ต์ ํ ๋๋ ์ฝ๋ ์คํ๋ฆฌํ ์, (5) 'react', 'useState', 'useEffect', 'useMemo', 'useCallback', 'memo', 'Suspense', 'lazy' ํค์๋๊ฐ ํฌํจ๋ ์์ ์
The file declares its own license as MIT. That is the authorโs claim about this one file, and it is not the same thing as the license GitHub reports for the repository, which is listed with the other numbers below.
SKILL.md
9.9 KB, as published. Nobody here has run it
React
Vercel ๊ฐ์ด๋ ๊ธฐ๋ฐ React ์ฑ๋ฅ ์ต์ ํ ๋ฒ ์คํธ ํ๋ํฐ์ค. ํ๋ ์์ํฌ ๋น์ข ์(Next.js, Remix, Vite ๋ฑ ๋ฌด๊ด).
๊ฐ ๊ท์น์ ์์ธ ์ค๋ช ๊ณผ ์ฝ๋ ์์ ๋ references/ ์ฐธ๊ณ . ์๋ณธ Vercel ๊ฐ์ด๋์ ์ ์ฒด ๊ท์น(Next.js/SSR ํฌํจ)์ vercel-react-best-practices ์ฐธ๊ณ .
๊ท์น ์นดํ ๊ณ ๋ฆฌ
| ์ฐ์ ์์ | ์นดํ ๊ณ ๋ฆฌ | ์ํฅ๋ | ์ ๋์ฌ |
|---|---|---|---|
| 1 | ๋น๋๊ธฐ ์ํฐํด ์ ๊ฑฐ | CRITICAL | async- |
| 2 | ๋ฒ๋ค ์ฌ์ด์ฆ ์ต์ ํ | CRITICAL | bundle- |
| 3 | ๋ฆฌ๋ ๋๋ง ์ต์ ํ | MEDIUM | rerender- |
| 4 | ๋ ๋๋ง ์ฑ๋ฅ | MEDIUM | rendering- |
| 5 | ํด๋ผ์ด์ธํธ ๋ฐ์ดํฐ/์ด๋ฒคํธ | MEDIUM | client- |
| 6 | JavaScript ์ฑ๋ฅ | LOW-MEDIUM | js- |
| 7 | ๊ณ ๊ธ ํจํด | LOW | advanced- |
๋น ๋ฅธ ์ฐธ์กฐ
1. ๋น๋๊ธฐ ์ํฐํด ์ ๊ฑฐ (CRITICAL)
async-parallel-Promise.all()๋ก ๋ ๋ฆฝ ์์ ๋ณ๋ ฌํasync-defer-await- ๋ถํ์ํ ๊ฒฝ๋ก์์ await ์ง์ฐasync-suspense-boundaries- Suspense๋ก ๋ถ๋ถ ๋ ๋๋งasync-dependencies- ๋ถ๋ถ ์์กด์ฑ ์๋ ์์ ์ ์ต๋ ๋ณ๋ ฌํ
2. ๋ฒ๋ค ์ฌ์ด์ฆ ์ต์ ํ (CRITICAL)
bundle-barrel-imports- barrel file ์ง์ import ์ง์bundle-lazy-React.lazy๋ก ์ฝ๋ ์คํ๋ฆฌํbundle-preload- hover/focus ์ ํ๋ฆฌ๋ก๋bundle-conditional- ๊ธฐ๋ฅ ํ์ฑํ ์์๋ง ๋ชจ๋ ๋ก๋bundle-defer-third-party- ๋นํ์ ์๋ํํฐ ํ์ด๋๋ ์ด์ ํ ๋ก๋
3. ๋ฆฌ๋ ๋๋ง ์ต์ ํ (MEDIUM)
rerender-functional-setstate- ํจ์ํ setState๋ก ์์ ์ ์ฝ๋ฐฑrerender-lazy-state-init- ๋น์ฉ ํฐ ์ด๊ธฐ๊ฐ ์ง์ฐ ์ด๊ธฐํrerender-derived-state- ํ์ boolean ๊ตฌ๋rerender-dependencies- Effect ์์กด์ฑ ์ขํ๊ธฐrerender-memo- memo๋ก ๋น์ฉ ํฐ ์์ ๋ถ๋ฆฌrerender-transitions- startTransition์ผ๋ก UI ๋ฐ์์ฑ ์ ์งrerender-ref-callbacks- ref callback์ผ๋ก DOM ์ ๊ทผ (useRef+useEffect ๋์ฒด)rerender-avoid-usestate- useState ๋์ฒด ํจํด ํ๋จ ๊ฐ์ด๋rerender-url-state- URL ๊ฒ์ ๋งค๊ฐ๋ณ์๋ก ์ํ ๊ด๋ฆฌrerender-form-libraries- ํผ ๋ผ์ด๋ธ๋ฌ๋ฆฌ๋ก useState ์ ๊ฑฐrerender-discriminated-union- discriminated union์ผ๋ก ๋ถ๊ฐ๋ฅํ ์ํ ๋ฐฉ์งrerender-use-reducer- useReducer๋ก ๋ณต์กํ ์ํ ์ ์ดrerender-derived-state-no-effect- ํ์ ์ํ๋ฅผ ๋ ๋๋ง ์ค ๊ณ์ฐrerender-defer-reads- ์ํ ์ฝ๊ธฐ๋ฅผ ์ฌ์ฉ ์์ ์ผ๋ก ์ง์ฐrerender-memo-with-default-value- memo ์ปดํฌ๋ํธ ๊ธฐ๋ณธ๊ฐ ์์ ์ถ์ถrerender-move-effect-to-event- ์ธํฐ๋์ ๋ก์ง์ ์ด๋ฒคํธ ํธ๋ค๋ฌ๋ก ์ด๋rerender-simple-expression-in-memo- ๋จ์ ํํ์์ useMemo ์ฌ์ฉ ๊ธ์งrerender-use-ref-transient-values- ์ผ์์ ๊ฐ์ useRef ์ฌ์ฉrerender-simplify-useeffect- useEffect๋ฅผ ์ปค์คํ ํ ์ผ๋ก ๋จ์ํ
4. ๋ ๋๋ง ์ฑ๋ฅ (MEDIUM)
rendering-animate-svg-wrapper- SVG ๋ํผ๋ก GPU ๊ฐ์rendering-content-visibility- ๊ธด ๋ชฉ๋ก ์คํ์คํฌ๋ฆฐ ์ต์ ํrendering-hoist-jsx- ์ ์ JSX ํธ์ด์คํrendering-conditional-render- ์ผํญ ์ฐ์ฐ์๋ก falsy ๋ฒ๊ทธ ๋ฐฉ์งrendering-hydration-no-flicker- ํ์ด๋๋ ์ด์ ๋ถ์ผ์น ์์ด ๊น๋นก์ ๋ฐฉ์งrendering-activity- Activity/CSS๋ก ์ํ/DOM ๋ณด์กดrendering-svg-precision- SVG ์ขํ ์ ๋ฐ๋ ์ถ์ (SVGO)rendering-usetransition-loading- useTransition์ผ๋ก ์๋ ๋ก๋ฉ ์ํ ๋์ฒดrendering-inp-css-feedback- CSS :active + yield๋ก INP ๊ฐ์rendering-composition-vs-early-return- Composition vs Early Return ์ ํ ๊ธฐ์ค
5. ํด๋ผ์ด์ธํธ ๋ฐ์ดํฐ/์ด๋ฒคํธ (MEDIUM)
client-passive-event-listeners- passive๋ก ์คํฌ๋กค ์ง์ฐ ์ ๊ฑฐclient-localstorage-schema- localStorage ๋ฒ์ ๊ด๋ฆฌclient-sync-external-store- useSyncExternalStore๋ก ๋ธ๋ผ์ฐ์ API/์ธ๋ถ ์คํ ์ด ๊ตฌ๋client-event-listeners- ๊ธ๋ก๋ฒ ์ด๋ฒคํธ ๋ฆฌ์ค๋ ์ค๋ณต ์ ๊ฑฐclient-data-dedup- TanStack Query/SWR๋ก ๋ฐ์ดํฐ ํ์นญ ์ค๋ณต ์ ๊ฑฐclient-abort-redundant-work- AbortController๋ก ๋ถํ์ํ ๋น๋๊ธฐ ์์ ์ทจ์
6. JavaScript ์ฑ๋ฅ (LOW-MEDIUM)
js-index-maps- Map์ผ๋ก O(1) ์กฐํjs-tosorted-immutable- toSorted()๋ก ๋ถ๋ณ์ฑ ์ ์งjs-set-map-lookups- Set์ผ๋ก O(1) ๋ฉค๋ฒ์ญ ๊ฒ์ฌjs-early-exit- ์กฐ๊ธฐ ๋ฐํ์ผ๋ก ๋ถํ์ํ ์ฒ๋ฆฌ ๋ฐฉ์งjs-batch-dom-css- DOM ์ฝ๊ธฐ/์ฐ๊ธฐ ๋ถ๋ฆฌ๋ก ๋ ์ด์์ ์ค๋์ฑ ๋ฐฉ์งjs-cache-function-results- ๋ฐ๋ณต ํจ์ ํธ์ถ ๋ชจ๋ ๋ ๋ฒจ ์บ์ฑjs-cache-property-access- ๋ฃจํ ๋ด ํ๋กํผํฐ ์ ๊ทผ ์บ์ฑjs-cache-storage- localStorage/cookie ์ฝ๊ธฐ ๋ฉ๋ชจ๋ฆฌ ์บ์ฑjs-combine-iterations- ๋ณต์ ๋ฐฐ์ด ์ํ๋ฅผ ๋จ์ผ ๋ฃจํ๋กjs-hoist-regexp- RegExp๋ฅผ ๋ชจ๋ ์ค์ฝํ๋ก ํธ์ด์คํjs-length-check-first- ๋ฐฐ์ด ๋น๊ต ์ ๊ธธ์ด ๋จผ์ ํ์ธjs-min-max-loop- ์ ๋ ฌ ๋์ ๋จ์ผ ๋ฃจํ๋ก min/maxjs-iterator-helpers- Iterator Helper๋ก ์ง์ฐ ์ฒ๋ฆฌ
7. ๊ณ ๊ธ ํจํด (LOW)
advanced-event-handler-refs- ์ด๋ฒคํธ ํธ๋ค๋ฌ๋ฅผ ref์ ์ ์ฅ (์ฌ๊ตฌ๋ ๋ฐฉ์ง)advanced-use-latest- useEffectEvent/useLatest๋ก ์์ ์ ์ฝ๋ฐฑ refadvanced-init-once- ์ฑ ์ด๊ธฐํ๋ฅผ ์ปดํฌ๋ํธ๊ฐ ์๋ ๋ชจ๋ ๋ ๋ฒจ์์advanced-closure-scope- ํด๋ก์ ์ค์ฝํ ๊ฒฉ๋ฆฌ๋ก ๋ฉ๋ชจ๋ฆฌ ๋์ ๋ฐฉ์ง
Vercel ์๋ณธ ๊ฐ์ด๋ ์ถ๊ฐ ๊ท์น
์ด ์คํฌ์ ํ๋ ์์ํฌ ๋น์ข ์ ๊ท์น๋ง ํฌํจ. Next.js/SSR ์ ์ฉ ๊ท์น์ ์๋ณธ ์ฐธ๊ณ :
| ๊ท์น | ์ํฅ๋ | ์ค๋ช |
|---|---|---|
server-cache-react | MEDIUM | React.cache()๋ก ์์ฒญ ๋ด ์ค๋ณต ์ ๊ฑฐ |
server-cache-lru | HIGH | LRU ์บ์๋ก ์์ฒญ ๊ฐ ์บ์ฑ |
server-serialization | HIGH | RSC ๊ฒฝ๊ณ์์ ์ง๋ ฌํ ์ต์ํ |
server-parallel-fetching | CRITICAL | ์ปดํฌ๋ํธ ๊ตฌ์ฑ์ผ๋ก ์๋ฒ ๋ฐ์ดํฐ ๋ณ๋ ฌ ํ์นญ |
server-after-nonblocking | MEDIUM | after()๋ก ๋
ผ๋ธ๋กํน ํ์ฒ๋ฆฌ |
server-auth-actions | MEDIUM | ์๋ฒ ์ก์ ์ธ์ฆ ๊ฒ์ฆ |
server-dedup-props | LOW | ์ค๋ณต props ์ ๊ฑฐ |
bundle-dynamic-imports | CRITICAL | next/dynamic์ผ๋ก ๋์ ์ํฌํธ |
rendering-hydration-suppress-warning | LOW | suppressHydrationWarning ์ฌ์ฉ |
async-api-routes | MEDIUM | API ๋ผ์ฐํธ ๋น๋๊ธฐ ํจํด |
์๋ณธ ์ ์ฒด ๋ฌธ์: vercel-labs/agent-skills: react-best-practices
์ฐธ๊ณ
- React ๊ณต์ ๋ฌธ์
- React Compiler - ์ฌ์ฉ ์
memo(),useMemo()์๋ ์ ์ฉ ๋ถํ์ - Vercel: How we made the dashboard twice as fast
- Vercel: How we optimized package imports