{
  "url": "https://unifast.dev/tr/docs/packages/react/overview/",
  "locale": "tr",
  "title": "@unifast/react",
  "description": "unifast HAST çıktısını bileşen eşlemesiyle React elemanlarına dönüştürün",
  "section": "packages",
  "body": "## Genel Bakış\n\n`@unifast/react`, unifast HAST (HTML Soyut Sözdizimi Ağacı) çıktısını React elemanlarına dönüştürür. İki ana fonksiyon sağlar:\n\n- [`compileToReact()`](/docs/packages/react/compile-to-react) - Yüksek seviyeli: Markdown/MDX'i derler ve doğrudan React elemanları döndürür\n- [`hastToReact()`](/docs/packages/react/hast-to-react) - Düşük seviyeli: bir HAST ağacını React elemanlarına dönüştürür\n\nPaket, HTML'den React'e özellik yeniden adlandırmasını (`class` → `className`, `for` → `htmlFor`, vb.) ve CSS stil string ayrıştırmasını otomatik olarak yönetir.\n\n## Kurulum\n\nPeer bağımlılık: `compileToReact` için `@unifast/node` gereklidir.\n\n## Tip Tanımları\n\n### CompileToReactOptions\n\n`CompileOptions`'ı React'e özgü alanlarla genişletir.\n\n| Özellik | Tür | Açıklama |\n|---------|-----|----------|\n| `createElement` | `CreateElement` | React'in `createElement` fonksiyonu |\n| `Fragment` | `unknown` | React'in `Fragment` bileşeni |\n| `components?` | `ComponentMap` | HTML etiket adlarının React bileşenlerine eşlemesi |\n| *(tüm CompileOptions)* | - | `CompileOptions`'tan devralınmıştır |\n\n### CompileToReactResult\n\n| Özellik | Tür | Açıklama |\n|---------|-----|----------|\n| `element` | `unknown` | Kök React elemanı |\n| `frontmatter` | `Record<string, unknown>` | Ayrıştırılmış frontmatter üst verisi |\n| `diagnostics` | `Diagnostic[]` | Uyarılar ve hatalar |\n| `stats` | `{ parseMs, transformMs, emitMs }` | Zamanlama dökümü (ms) |\n| `toc` | `TocEntry[]` | Çıkarılan içindekiler tablosu |\n\n### HastToReactOptions\n\n| Özellik | Tür | Açıklama |\n|---------|-----|----------|\n| `createElement` | `CreateElement` | React'in `createElement` fonksiyonu |\n| `Fragment` | `unknown` | React'in `Fragment` bileşeni |\n| `components?` | `ComponentMap` | HTML etiket adlarının özel React bileşenlerine eşlemesi |\n\n### CreateElement\n\n```ts\ntype CreateElement = (type: any, props: any, ...children: any[]) => any;\n```\n\n### ComponentMap\n\n```ts\ntype ComponentMap = Record<string, unknown>;\n```\n\n### Özellik Dönüşümü\n\n| HTML Özniteliği | React Prop |\n|-----------------|------------|\n| `class` | `className` |\n| `for` | `htmlFor` |\n| `accesskey` | `accessKey` |\n| `autocomplete` | `autoComplete` |\n| `autofocus` | `autoFocus` |\n| `autoplay` | `autoPlay` |\n| `charset` | `charSet` |\n| `colspan` | `colSpan` |\n| `contenteditable` | `contentEditable` |\n| `crossorigin` | `crossOrigin` |\n| `datetime` | `dateTime` |\n| `enctype` | `encType` |\n| `formaction` | `formAction` |\n| `hreflang` | `hrefLang` |\n| `httpequiv` | `httpEquiv` |\n| `inputmode` | `inputMode` |\n| `maxlength` | `maxLength` |\n| `minlength` | `minLength` |\n| `novalidate` | `noValidate` |\n| `readonly` | `readOnly` |\n| `referrerpolicy` | `referrerPolicy` |\n| `rowspan` | `rowSpan` |\n| `spellcheck` | `spellCheck` |\n| `srcdoc` | `srcDoc` |\n| `srclang` | `srcLang` |\n| `srcset` | `srcSet` |\n| `tabindex` | `tabIndex` |\n| `usemap` | `useMap` |\n\nCSS `style` string'leri otomatik olarak React stil nesnelerine ayrıştırılır (örn. `\"font-size: 16px\"` → `{ fontSize: \"16px\" }`).\n\n## Export Özeti\n\n| Export | Tür | Açıklama |\n|--------|-----|----------|\n| `compileToReact` | function | Markdown/MDX'i React elemanlarına derle |\n| `hastToReact` | function | HAST'i React elemanlarına dönüştür |\n| `CompileToReactOptions` | type | `compileToReact` için seçenekler |\n| `CompileToReactResult` | type | `compileToReact` sonucu |\n| `HastToReactOptions` | type | `hastToReact` için seçenekler |\n| `CreateElement` | type | React createElement imzası |\n| `ComponentMap` | type | HTML etiketten bileşene eşleme |",
  "alternates": [
    {
      "locale": "en",
      "url": "https://unifast.dev/docs/packages/react/overview/",
      "api": "https://unifast.dev//api/docs/packages/react/overview.json"
    },
    {
      "locale": "ja",
      "url": "https://unifast.dev/ja/docs/packages/react/overview/",
      "api": "https://unifast.dev//api/ja/docs/packages/react/overview.json"
    },
    {
      "locale": "zh-CN",
      "url": "https://unifast.dev/zh-CN/docs/packages/react/overview/",
      "api": "https://unifast.dev//api/zh-CN/docs/packages/react/overview.json"
    },
    {
      "locale": "zh-TW",
      "url": "https://unifast.dev/zh-TW/docs/packages/react/overview/",
      "api": "https://unifast.dev//api/zh-TW/docs/packages/react/overview.json"
    },
    {
      "locale": "ko",
      "url": "https://unifast.dev/ko/docs/packages/react/overview/",
      "api": "https://unifast.dev//api/ko/docs/packages/react/overview.json"
    },
    {
      "locale": "fr",
      "url": "https://unifast.dev/fr/docs/packages/react/overview/",
      "api": "https://unifast.dev//api/fr/docs/packages/react/overview.json"
    },
    {
      "locale": "it",
      "url": "https://unifast.dev/it/docs/packages/react/overview/",
      "api": "https://unifast.dev//api/it/docs/packages/react/overview.json"
    },
    {
      "locale": "es",
      "url": "https://unifast.dev/es/docs/packages/react/overview/",
      "api": "https://unifast.dev//api/es/docs/packages/react/overview.json"
    },
    {
      "locale": "pt-BR",
      "url": "https://unifast.dev/pt-BR/docs/packages/react/overview/",
      "api": "https://unifast.dev//api/pt-BR/docs/packages/react/overview.json"
    },
    {
      "locale": "de",
      "url": "https://unifast.dev/de/docs/packages/react/overview/",
      "api": "https://unifast.dev//api/de/docs/packages/react/overview.json"
    },
    {
      "locale": "ru",
      "url": "https://unifast.dev/ru/docs/packages/react/overview/",
      "api": "https://unifast.dev//api/ru/docs/packages/react/overview.json"
    },
    {
      "locale": "hi",
      "url": "https://unifast.dev/hi/docs/packages/react/overview/",
      "api": "https://unifast.dev//api/hi/docs/packages/react/overview.json"
    },
    {
      "locale": "id",
      "url": "https://unifast.dev/id/docs/packages/react/overview/",
      "api": "https://unifast.dev//api/id/docs/packages/react/overview.json"
    },
    {
      "locale": "tr",
      "url": "https://unifast.dev/tr/docs/packages/react/overview/",
      "api": "https://unifast.dev//api/tr/docs/packages/react/overview.json"
    },
    {
      "locale": "vi",
      "url": "https://unifast.dev/vi/docs/packages/react/overview/",
      "api": "https://unifast.dev//api/vi/docs/packages/react/overview.json"
    }
  ]
}
