본문으로 건너뛰기
Skillpedia
웹사이트 및 UI (프런트엔드)29k · #9835

custom-features

하는 일

이 스킬은 TanStack Table에 새 상태나 동작을 추가하는 재사용 가능한 기능, 즉 플러그인을 만드는 방법을 보여줍니다. 기본 기능으로 해결되지 않는 요구가 있는 고급 개발자를 위한 것입니다.

사용하는 경우

  • ✓테이블 객체에 추가되어야 하는 재사용 가능한 상태나 동작이 필요할 때.
  • ✓기본 옵션과 타입 메타로 렌더러나 앱 설정을 처리할 수 없을 때.
  • ✓수명 주기 훅과 테이블 메서드를 올바르게 등록하는 플러그인을 작성할 때.

스킬 링크

https://github.com/TanStack/table/blob/main/packages/table-core/skills/custom-features/SKILL.md

복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.

사용 방법

가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.

바로 붙여넣을 수 있는 메시지

Use this skill to help me: https://github.com/TanStack/table/blob/main/packages/table-core/skills/custom-features/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
AI가 이런 스킬을 알아서 찾아 쓰길 원하시나요?무료 Skillpedia MCP를 설치하세요. 한 줄이면 작업마다 스킬 15,000+개 중에서 검색합니다.1분 만에 설치 →

AI에게 요청하는 예시

“TanStack Table의 기본 기능으로는 제가 원하는 것을 할 수 없어요. 직접 플러그인을 만들려면 어떻게 하나요?”

매주 새 스킬 5개. 읽는 데 1분.

작동 방식

기능을 선언하고, 사용자 상태를 보존하며, 수명 주기 훅 동안 테이블과 객체 메서드를 추가하고, 안정적인 기능 객체로 플러그인을 등록하는 과정을 안내합니다.

기술 내용 (원본 SKILL.md)

작성자의 영어 원문을 GitHub에서 그대로 가져왔습니다.

Author a custom feature

Read core and feature architecture first. Use a plugin for reusable state or behavior that must augment Table objects. Built-in options and typed tableMeta/columnMeta are usually enough for renderer callbacks and application configuration.

Implementation workflow

  1. Identify the state, options, and object methods the behavior owns. If it only passes callbacks or renderer data, read scoped meta typing and use meta instead.
  2. Before declaring plugin types or writing lifecycle hooks, read the complete plugin example. It enumerates all 10 public FeatureMaps, the API assignment helpers, lifecycle ordering, and the advanced row-model maps.
  3. Declare the feature key in Plugins. Merge only FeatureMaps with matching runtime implementations; declarations alone install no behavior.
  4. Preserve user state after defaults in getInitialState; connect state updaters in default options. Install table methods with assignTableAPIs and object methods with assignPrototypeAPIs inside the corresponding lifecycle hooks.
  5. Keep the feature object and tableFeatures({ customFeature }) result stable. Register the plugin through tableFeatures so inference and composition include it.
  6. Verify the advertised state, options, methods, and resets on a constructed table. Each declared API must exist at runtime; reset behavior must respect the state owner.

Lifecycle boundaries

Use initTableInstanceData for mutable data owned by one table and resetTableInstanceData for clearing its transient contents. All feature initialization finishes before any constructTableAPIs hook. Keep method installation separate from data allocation.

Prototype methods are shared across the table's rows, columns, cells, or headers. Read per-object values through the method's current instance, and use the supported instance-data hooks for mutable fields. Read the example's installation rules before adding memoized methods or advanced row-model/cache wiring.

Common failures

  • Types without matching runtime hooks advertise APIs that do not exist.
  • Ad hoc mutation of constructed instances bypasses feature registration and inferred composition.
  • Treating the density example as the only extension pattern misses column definitions and the other public FeatureMaps. Choose the maps required by the behavior; advanced row-model declarations also require runtime pipeline/cache wiring.

Installed API discovery

Inspect node_modules/@tanstack/table-core/dist/types/TableFeatures.d.ts, the exported *_FeatureMap interfaces in dist/types/, and assignTableAPIs/assignPrototypeAPIs in dist/utils.d.ts. Follow declarations under dist/features/ for comparable stock lifecycle signatures.

자주 묻는 질문

언제 커스텀 기능을 만들지 말아야 하나요?

동작이 콜백이나 렌더러 데이터를 전달하기만 한다면 타입 메타를 쓰라고 이 스킬은 설명합니다.

기능 타입을 선언하면 동작이 설치되나요?

아닙니다. 선언만으로는 아무것도 설치되지 않으므로, 실행 구현이 선언된 타입과 맞아야 합니다.

플러그인은 어디에 등록하나요?

tableFeatures 호출을 통해 등록해야 타입 추론과 조합에 포함됩니다.

상세 정보

작성자의 원본 설명

Implement a Table v9 plugin when built-ins and typed meta are insufficient. Covers FeatureMaps, runtime lifecycle hooks, prototypes, and a complete checked example.

repo: TanStack/table

인기도

GitHub 스타
29k
순위
#9835
라이선스
MIT
업데이트
2026. 10. 21.

이 스킬이 유용한가요?

0

로그인 투표하려면 로그인하세요.

댓글

  • …

이 저장소의 다른 스킬

비슷한 스킬