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

table-state

하는 일

이 스킬은 현재 페이지 같은 테이블 설정이 Solid 앱에서 어떻게 작동하는지 설명합니다. 테이블과 자체 컴포넌트가 같은 값에 반응해야 하는 Solid 개발자를 위한 것입니다.

사용하는 경우

  • ✓Solid 템플릿이 현재 페이지나 다른 테이블 설정을 보여줘야 할 때.
  • ✓테이블 설정을 Solid 시그널이나 memo에 연결해야 할 때.
  • ✓테이블이 바뀌었는데 컴포넌트 본문에서 읽은 값이 갱신되지 않을 때.

스킬 링크

https://github.com/TanStack/table/blob/main/packages/solid-table/skills/table-state/SKILL.md

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

사용 방법

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

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

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

AI에게 요청하는 예시

“Solid 테이블의 현재 페이지 번호를 항상 최신 상태로 버튼 라벨에 표시하려면 어떻게 하나요?”

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

작동 방식

테이블의 atom을 JSX, memo 또는 effect 안에서 읽어 Solid가 추적하도록 하는 방법과, 업데이터 함수를 받을 수 있는 setter로 제어되는 시그널을 전달하는 방법을 보여줍니다.

기술 내용 (원본 SKILL.md)

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

Solid table state

Before starting, run intent load @tanstack/table-core#table-state for shared ownership, initialization, updates, and resets.

Read reactive state

The adapter backs table atoms with Solid signals and memos. Read table.atoms.<slice>.get() inside JSX, createMemo, createEffect, or another tracked scope. A value captured once outside tracking is only a snapshot. Solid has no React-style selected table.state.

table.Subscribe is deprecated and adds no subscription or tracking scope. Read table.atoms directly inside JSX, memos, or effects. Component bodies are untracked; keep reads inside tracked scopes. Track the required atoms instead of adding whole-store forced rerenders.

Control a slice

Keep features and columns stable. Expose changing data and controlled state through getters. Solid setters already accept Table's raw values and updater functions:

import { createMemo, createSignal } from 'solid-js'
import {
  createTable,
  rowPaginationFeature,
  tableFeatures,
  type PaginationState,
} from '@tanstack/solid-table'

const features = tableFeatures({ rowPaginationFeature })
const columns = [{ accessorKey: 'name' }]

export function PageControl() {
  const [data] = createSignal([{ name: 'Ada' }])
  const [pagination, setPagination] = createSignal<PaginationState>({
    pageIndex: 0,
    pageSize: 20,
  })
  const table = createTable({
    features,
    columns,
    get data() {
      return data()
    },
    state: {
      get pagination() {
        return pagination()
      },
    },
    onPaginationChange: setPagination,
  })
  const pageSize = createMemo(() => table.atoms.pagination.get().pageSize)
  return (
    <button onClick={() => table.setPageSize(50)}>
      {pageSize()} rows per page
    </button>
  )
}

When wrapping a setter to add a side effect, resolve both updater forms before storing the result. For shared atom ownership, use createAtom from @tanstack/solid-store and pass it in atoms.<slice>.

For external atoms, custom updater wrappers, or tracking failures, read reactivity details. If this task changes processing features, run intent load @tanstack/table-core#table-features and read the relevant feature references.

API discovery

Inspect node_modules/@tanstack/solid-table/dist/createTable.d.ts and reactivity.d.ts; inspect @tanstack/solid-store declarations for external atoms.

자주 묻는 질문

컴포넌트 본문에서 읽은 값이 왜 갱신되지 않나요?

Solid는 컴포넌트 본문의 읽기를 추적하지 않으므로, 그곳의 값은 스냅샷일 뿐입니다.

테이블의 Subscribe 컴포넌트가 아직 필요한가요?

아닙니다. 이 스킬은 해당 컴포넌트가 지원 중단되었다고 설명하며, JSX, memo 또는 effect에서 atom을 직접 읽는 방식을 권장합니다.

setter가 업데이터 함수를 받을 수 있나요?

네. Solid setter는 값과 업데이터 함수를 모두 받을 수 있으며, 테이블이 이를 기대합니다.

상세 정보

작성자의 원본 설명

Read and control Table v9 state in solid. Use for tracked reads, subscriptions, controlled slices, and framework-specific reactive boundaries.

repo: TanStack/table

인기도

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

이 스킬이 유용한가요?

0

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

댓글

  • …

이 저장소의 다른 스킬

비슷한 스킬