Skillpedia
المواقع والواجهات (frontend)29k · #9819

devtools

ما الذي تفعله

تشرح هذه المهارة كيف تسجّل جداول Preact في لوحة TanStack Devtools، ليتمكن المطورون من فحصها أثناء البناء. وهي مخصصة لمطوري Preact الذين يريدون رؤية حالة الجدول أثناء التطوير.

متى تستخدمها

  • ✓عندما تريد فحص حالة جدول Preact أثناء تشغيل التطبيق في بيئة التطوير.
  • ✓عندما لا يظهر جدول في لوحة الأدوات وتحتاج إلى فحص تسجيله.
  • ✓عندما تُخلط حزم React وPreact ولا تتصل الأدوات بشكل صحيح.

رابط المهارة

https://github.com/TanStack/table/blob/main/packages/preact-table-devtools/skills/devtools/SKILL.md

انسخه والصقه في الذكاء الاصطناعي الذي تستخدمه (Claude أو ChatGPT أو Cursor) واطلب منه اتباع التعليمات.

طريقة الاستخدام

أسهل طريقة: انسخ الرسالة والصقها في الذكاء الاصطناعي الذي تستخدمه. سيقرأ المهارة وينفّذ تعليماتها.

رسالة جاهزة للصق

استخدم هذه المهارة لمساعدتي: https://github.com/TanStack/table/blob/main/packages/preact-table-devtools/skills/devtools/SKILL.md اقرأ ملف SKILL.md في هذا الرابط ونفّذ تعليماته لمهمتي.
تريد أن يجد الذكاء الاصطناعي مهارات مثل هذه بنفسه؟ثبّت خادم Skillpedia MCP المجاني: سطر واحد، ويبحث في 15,000+ مهارة قبل كل مهمة.ثبّته في دقيقة واحدة →

مثال على ما تطلبه من الذكاء الاصطناعي

“جدول Preact الخاص بي لا يظهر في لوحة TanStack Devtools. كيف أربطه؟”

5 مهارات جديدة كل أسبوع. قراءة في دقيقة واحدة.

كيف تعمل

تشرح المهارة كيف تنشئ الجدول بمفتاح فريد، وتسجله بخطاف Preact، وتضيف إضافة الأدوات مرة واحدة قرب جذر التطبيق.

المحتوى التقني (ملف SKILL.md الأصلي)

النص الأصلي من المؤلف، مباشرة من GitHub.

This skill builds on @tanstack/table-core#core and @tanstack/table-devtools#devtools.

Setup

import { TanStackDevtools } from '@tanstack/preact-devtools'
import { useTable, tableFeatures } from '@tanstack/preact-table'
import {
  tableDevtoolsPlugin,
  useTanStackTableDevtools,
} from '@tanstack/preact-table-devtools'

const features = tableFeatures({})
const columns = [{ accessorKey: 'id' }]
const data: Array<{ id: string }> = []

export function App() {
  const table = useTable({
    key: 'users-table',
    features,
    columns,
    data,
  })
  useTanStackTableDevtools(table)
  return <TanStackDevtools plugins={[tableDevtoolsPlugin()]} />
}

Hooks and Components

Use the native Preact packages throughout. Pass { enabled } rather than conditionally calling the registration hook.

Common Mistakes

HIGH React Devtools package mixed into Preact

Wrong: import the hook from @tanstack/react-table-devtools through compat.

Correct: use @tanstack/preact-table-devtools with @tanstack/preact-devtools.

The native adapter owns Preact effect lifecycle and plugin types.

Source: TanStack/table:docs/devtools.md

HIGH Missing or duplicate key

Wrong: omit key or reuse users-table for multiple mounted tables.

Correct: give each live table one stable unique key.

Keyless registration is skipped; duplicate keys replace targets.

Source: TanStack/table:packages/table-devtools/src/tableTarget.ts

MEDIUM Production no-op mistaken for failure

Wrong: expect the default entrypoint to stay active in a production bundle.

Correct: keep Devtools development-only unless an explicit production import is required.

The default index deliberately selects no-op implementations outside development.

Source: TanStack/table:packages/preact-table-devtools/src/index.ts

API Discovery

Inspect node_modules/@tanstack/preact-table-devtools/dist/index.d.ts and useTanStackTableDevtools.d.ts; do not copy React adapter imports.

الأسئلة الشائعة

لماذا يحتاج كل جدول إلى مفتاح؟

الجداول بلا مفتاح تُتجاهل، والجدولان بالمفتاح نفسه يستبدل أحدهما الآخر في اللوحة.

هل أستطيع تشغيل التسجيل أو إيقافه؟

نعم. يقبل الخطاف خيار enabled، فتستطيع إيقافه دون حذف الاستدعاء.

هل أستخدم حزم React الخاصة بالأدوات في تطبيق Preact؟

لا. تقول المهارة استخدم حزم Preact الأصلية بدل استيراد حزم React عبر أسماء مستعارة للتوافق.

التفاصيل

الوصف الأصلي من المؤلف

Connect native Preact Table v9 instances to Devtools with tableDevtoolsPlugin and useTanStackTableDevtools. Load for React-package mixups, missing targets, required options.key, enabled state, cleanup, or development gating.

repo: TanStack/table

الشعبية

نجوم GitHub
29k
الترتيب
#9819
الترخيص
MIT
آخر تحديث
21‏/10‏/2026

هل هذه المهارة مفيدة؟

0

سجّل الدخول للتصويت.

التعليقات

  • …

المزيد من المهارات من هذا المستودع

مهارات مشابهة