{"id":37936,"date":"2026-01-18T22:40:56","date_gmt":"2026-01-18T19:40:56","guid":{"rendered":"https:\/\/fatihsoysal.com\/blog\/?p=37936"},"modified":"2026-01-18T22:40:56","modified_gmt":"2026-01-18T19:40:56","slug":"reactte-useeffect-hooku-ile-web-api-cagrilari-nasil-yapilir","status":"publish","type":"post","link":"https:\/\/fatihsoysal.com\/blog\/reactte-useeffect-hooku-ile-web-api-cagrilari-nasil-yapilir\/","title":{"rendered":"React&#8217;te useEffect Hook&#8217;u ile Web API \u00c7a\u011fr\u0131lar\u0131 Nas\u0131l Yap\u0131l\u0131r?"},"content":{"rendered":"<p><body><\/p>\n<h2>React&#8217;te useEffect Hook&#8217;u ile Web API \u00c7a\u011fr\u0131lar\u0131 Nas\u0131l Yap\u0131l\u0131r?<\/h2>\n<p>React, modern web uygulamalar\u0131 geli\u015ftirmek i\u00e7in pop\u00fcler bir JavaScript k\u00fct\u00fcphanesidir. Bile\u015fen tabanl\u0131 mimarisi sayesinde kullan\u0131c\u0131 aray\u00fczlerini k\u00fc\u00e7\u00fck, yeniden kullan\u0131labilir par\u00e7alara ay\u0131rmay\u0131 ve y\u00f6netmeyi kolayla\u015ft\u0131r\u0131r. Ancak, \u00e7o\u011fu dinamik web uygulamas\u0131n\u0131n harici veri kaynaklar\u0131na, yani Web API&#8217;lerine ba\u011flanmas\u0131 gerekir. Kullan\u0131c\u0131lar\u0131n g\u00f6rece\u011fi dinamik i\u00e7erik, genellikle bir sunucudan veya \u00fc\u00e7\u00fcnc\u00fc taraf bir hizmetten \u00e7ekilir. Bu veri \u00e7ekme (data fetching) i\u015flemleri, React bile\u015fenlerinin ya\u015fam d\u00f6ng\u00fcs\u00fcnde belirli anlarda ger\u00e7ekle\u015fmesi gereken &#8220;yan etkiler&#8221; (side effects) kategorisine girer.<\/p>\n<p>React&#8217;in s\u0131n\u0131f tabanl\u0131 bile\u015fenlerinde bu t\u00fcr yan etkiler <code>componentDidMount<\/code>, <code>componentDidUpdate<\/code> ve <code>componentWillUnmount<\/code> gibi ya\u015fam d\u00f6ng\u00fcs\u00fc metotlar\u0131 kullan\u0131larak y\u00f6netilirdi. Ancak React Hooks&#8217;un tan\u0131t\u0131lmas\u0131yla birlikte, fonksiyonel bile\u015fenlerde de bu yetenekler <code>useEffect<\/code> hook&#8217;u arac\u0131l\u0131\u011f\u0131yla sunuldu. <code>useEffect<\/code>, fonksiyonel bile\u015fenlerde veri \u00e7ekme, abonelikler kurma veya DOM&#8217;u do\u011frudan manip\u00fcle etme gibi yan etkileri ger\u00e7ekle\u015ftirmenin standart yoludur.<\/p>\n<p>Bu makalede, React&#8217;te <code>useEffect<\/code> hook&#8217;unu kullanarak Web API \u00e7a\u011fr\u0131lar\u0131n\u0131 nas\u0131l yapaca\u011f\u0131m\u0131z\u0131 detayl\u0131 bir \u015fekilde inceleyece\u011fiz. Temel API \u00e7a\u011fr\u0131s\u0131 yap\u0131s\u0131ndan ba\u015flayarak, veri durumunu y\u00f6netmeye, ba\u011f\u0131ml\u0131l\u0131k dizisini do\u011fru kullanmaya, hata y\u00f6netimine, temizleme fonksiyonlar\u0131na ve hatta daha geli\u015fmi\u015f senaryolara kadar ad\u0131m ad\u0131m ilerleyece\u011fiz. Amac\u0131m\u0131z, <code>useEffect<\/code> ile sa\u011flam, verimli ve hata toleransl\u0131 API \u00e7a\u011fr\u0131lar\u0131 yapma konusunda size kapsaml\u0131 bir rehber sunmakt\u0131r.<\/p>\n<h3>useEffect Hook&#8217;una Giri\u015f<\/h3>\n<p><code>useEffect<\/code> hook&#8217;u, React fonksiyonel bile\u015fenlerinde &#8220;yan etkileri&#8221; ger\u00e7ekle\u015ftirmek i\u00e7in kullan\u0131l\u0131r. Yan etkiler, bir fonksiyonun ana i\u015flevinin d\u0131\u015f\u0131nda kalan ve d\u0131\u015f d\u00fcnya ile etkile\u015fime giren her t\u00fcrl\u00fc eylemi ifade eder. Bir React bile\u015feni ba\u011flam\u0131nda, bu genellikle \u015funlar\u0131 i\u00e7erir:<\/p>\n<p>*   <strong>Veri \u00c7ekme (Data Fetching):<\/strong> Bir API&#8217;den veri almak.<br \/>\n*   <strong>Abonelikler (Subscriptions):<\/strong> WebSocket gibi harici bir veri kayna\u011f\u0131na abone olmak.<br \/>\n*   <strong>DOM Manip\u00fclasyonu:<\/strong> Bile\u015fenin d\u0131\u015f\u0131nda kalan DOM elemanlar\u0131n\u0131 do\u011frudan de\u011fi\u015ftirmek (\u00f6rne\u011fin, belge ba\u015fl\u0131\u011f\u0131n\u0131 g\u00fcncellemek).<br \/>\n*   <strong>Zamanlay\u0131c\u0131lar (Timers):<\/strong> <code>setTimeout<\/code> veya <code>setInterval<\/code> kullanmak.<\/p>\n<p><code>useEffect<\/code>&#8216;in temel yap\u0131s\u0131 \u015fu \u015fekildedir:<\/p>\n<pre><code class=\"language-javascript\">useEffect(callback, [dependencies]);<\/code><\/pre>\n<p>*   <strong><code>callback<\/code> (Geri \u00c7a\u011f\u0131rma Fonksiyonu):<\/strong> Bu, yan etki mant\u0131\u011f\u0131n\u0131z\u0131 i\u00e7eren fonksiyondur. React, bile\u015fen her render edildi\u011finde (veya ba\u011f\u0131ml\u0131l\u0131klar de\u011fi\u015fti\u011finde) bu fonksiyonu \u00e7al\u0131\u015ft\u0131r\u0131r.<br \/>\n*   <strong><code>[dependencies]<\/code> (Ba\u011f\u0131ml\u0131l\u0131k Dizisi):<\/strong> Bu iste\u011fe ba\u011fl\u0131 bir dizidir ve <code>useEffect<\/code>&#8216;in ne zaman yeniden \u00e7al\u0131\u015ft\u0131r\u0131laca\u011f\u0131n\u0131 kontrol eder.<br \/>\n    *   <strong>Bo\u015f dizi (<code>[]<\/code>):<\/strong> <code>useEffect<\/code> yaln\u0131zca bile\u015fen ilk kez monte edildi\u011finde (mount) \u00e7al\u0131\u015f\u0131r ve bir daha \u00e7al\u0131\u015fmaz (s\u0131n\u0131f bile\u015fenlerindeki <code>componentDidMount<\/code> gibidir). Bu, genellikle ilk veri \u00e7ekme i\u015flemleri i\u00e7in idealdir.<br \/>\n    *   <strong>Hi\u00e7bir ba\u011f\u0131ml\u0131l\u0131k dizisi yok:<\/strong> <code>useEffect<\/code> bile\u015fen her render edildi\u011finde \u00e7al\u0131\u015f\u0131r. Bu, genellikle bir sonsuz d\u00f6ng\u00fcye yol a\u00e7abilece\u011fi i\u00e7in dikkatli kullan\u0131lmal\u0131d\u0131r ve \u00e7o\u011fu zaman istenmeyen bir durumdur.<br \/>\n    *   <strong>De\u011ferler i\u00e7eren bir dizi (<code>[propA, stateB]<\/code>):<\/strong> <code>useEffect<\/code> sadece dizideki de\u011ferlerden herhangi biri bir \u00f6nceki render&#8217;dan farkl\u0131ysa \u00e7al\u0131\u015f\u0131r. Bu, belirli prop veya state de\u011fi\u015fikliklerine tepki vermek i\u00e7in kullan\u0131l\u0131r.<\/p>\n<p><code>useEffect<\/code>&#8216;in d\u00f6n\u00fc\u015f de\u011feri olarak bir fonksiyon d\u00f6nd\u00fcr\u00fclebilir. Bu d\u00f6n\u00fc\u015f fonksiyonu, bile\u015fen kald\u0131r\u0131ld\u0131\u011f\u0131nda (unmount) veya <code>useEffect<\/code> bir sonraki \u00e7al\u0131\u015ft\u0131\u011f\u0131nda (ba\u011f\u0131ml\u0131l\u0131klar de\u011fi\u015fti\u011fi i\u00e7in) temizleme (cleanup) i\u015flemi yapmak i\u00e7in kullan\u0131l\u0131r. \u00d6rne\u011fin, abonelikleri iptal etmek veya zamanlay\u0131c\u0131lar\u0131 temizlemek i\u00e7in idealdir. Veri \u00e7ekme senaryolar\u0131nda, devam eden bir iste\u011fi iptal etmek i\u00e7in kullan\u0131labilir.<\/p>\n<h3>Temel API \u00c7a\u011fr\u0131s\u0131 Yap\u0131s\u0131<\/h3>\n<p>Web API&#8217;lerinden veri \u00e7ekmek i\u00e7in JavaScript&#8217;in yerle\u015fik <code>fetch<\/code> API&#8217;sini veya \u00fc\u00e7\u00fcnc\u00fc taraf k\u00fct\u00fcphaneleri (\u00f6rne\u011fin, Axios) kullanabiliriz. Bu makalede <code>fetch<\/code> API&#8217;sine odaklanaca\u011f\u0131z, \u00e7\u00fcnk\u00fc herhangi bir ek kurulum gerektirmez ve modern taray\u0131c\u0131lar taraf\u0131ndan geni\u015f \u00e7apta desteklenir.<\/p>\n<p><code>fetch<\/code> API&#8217;si, Promise tabanl\u0131d\u0131r ve asenkron i\u015flemler i\u00e7in <code>async\/await<\/code> s\u00f6zdizimi ile kullan\u0131m\u0131 \u00e7ok daha okunabilir hale gelir. Temel bir <code>fetch<\/code> iste\u011fi \u015fu \u015fekilde g\u00f6r\u00fcn\u00fcr:<\/p>\n<pre><code class=\"language-javascript\">async function fetchData() {\n  try {\n    const response = await fetch('https:\/\/api.example.com\/data');\n    if (!response.ok) {\n      throw new Error(<code>HTTP error! status: ${response.status}<\/code>);\n    }\n    const data = await response.json();\n    console.log(data);\n  } catch (error) {\n    console.error(\"Veri \u00e7ekme hatas\u0131:\", error);\n  }\n}\n\nfetchData();<\/code><\/pre>\n<p>Bu yap\u0131y\u0131 <code>useEffect<\/code> hook&#8217;u i\u00e7ine entegre ederken, genellikle bile\u015fenimizin durumu (state) ile etkile\u015fime girmesi gerekir. <code>useState<\/code> hook&#8217;u, bile\u015fenin durumunu y\u00f6netmek i\u00e7in kullan\u0131l\u0131r ve API&#8217;den gelen verileri, y\u00fckleme durumunu ve hata mesajlar\u0131n\u0131 saklamak i\u00e7in vazge\u00e7ilmezdir.<\/p>\n<p>A\u015fa\u011f\u0131da, <code>useEffect<\/code> ve <code>useState<\/code> kullanarak basit bir veri \u00e7ekme \u00f6rne\u011fi verilmi\u015ftir:<\/p>\n<pre><code class=\"language-javascript\">import React, { useState, useEffect } from 'react';\n\nfunction MyComponent() {\n  const [data, setData] = useState(null);\n  const [loading, setLoading] = useState(true);\n  const [error, setError] = useState(null);\n\n  useEffect(() => {\n    async function fetchData() {\n      try {\n        const response = await fetch('https:\/\/jsonplaceholder.typicode.com\/posts\/1');\n        if (!response.ok) {\n          throw new Error(<code>HTTP hatas\u0131! Durum: ${response.status}<\/code>);\n        }\n        const result = await response.json();\n        setData(result);\n      } catch (err) {\n        setError(err);\n      } finally {\n        setLoading(false);\n      }\n    }\n\n    fetchData(); \/\/ useEffect i\u00e7inde tan\u0131mlanan asenkron fonksiyonu \u00e7a\u011f\u0131r\n  }, []); \/\/ Bo\u015f ba\u011f\u0131ml\u0131l\u0131k dizisi: Sadece bile\u015fen ilk y\u00fcklendi\u011finde \u00e7al\u0131\u015f\u0131r.\n\n  if (loading) return <div>Y\u00fckleniyor...<\/div>;\n  if (error) return <div>Hata: {error.message}<\/div>;\n\n  return (\n    <div>\n      <h2>API'den Gelen Veri:<\/h2>\n      <p>Ba\u015fl\u0131k: {data.title}<\/p>\n      <p>\u0130\u00e7erik: {data.body}<\/p>\n    <\/div>\n  );\n}\n\nexport default MyComponent;<\/code><\/pre>\n<p>Bu \u00f6rnekte:<br \/>\n1.  <code>useState<\/code> kullanarak <code>data<\/code>, <code>loading<\/code> ve <code>error<\/code> durum de\u011fi\u015fkenlerini tan\u0131mlad\u0131k. <code>loading<\/code> ba\u015flang\u0131\u00e7ta <code>true<\/code> olarak ayarlanm\u0131\u015ft\u0131r \u00e7\u00fcnk\u00fc veri \u00e7ekme i\u015flemi hemen ba\u015flayacakt\u0131r.<br \/>\n2.  <code>useEffect<\/code> i\u00e7inde <code>fetchData<\/code> ad\u0131nda asenkron bir fonksiyon tan\u0131mlad\u0131k. Bu fonksiyon, API&#8217;den veri \u00e7eker, ba\u015far\u0131l\u0131 olursa <code>setData<\/code> ile durumu g\u00fcnceller, bir hata olursa <code>setError<\/code> ile hatay\u0131 kaydeder ve her durumda <code>setLoading(false)<\/code> ile y\u00fckleme durumunu sonland\u0131r\u0131r.<br \/>\n3.  <code>fetchData()<\/code> \u00e7a\u011fr\u0131s\u0131, <code>useEffect<\/code> i\u00e7inde tan\u0131mland\u0131ktan hemen sonra yap\u0131l\u0131r.<br \/>\n4.  Ba\u011f\u0131ml\u0131l\u0131k dizisi <code>[]<\/code> oldu\u011fu i\u00e7in, bu <code>useEffect<\/code> sadece bile\u015fen ilk monte edildi\u011finde bir kez \u00e7al\u0131\u015f\u0131r.<\/p>\n<h3>Veri Durumunu Y\u00f6netme<\/h3>\n<p>API \u00e7a\u011fr\u0131lar\u0131 yaparken, verinin kendisi kadar, bu verinin y\u00fckleme durumu ve olas\u0131 hatalar\u0131 da kullan\u0131c\u0131ya do\u011fru bir \u015fekilde yans\u0131t\u0131lmal\u0131d\u0131r. <code>useState<\/code> hook&#8217;u, bu farkl\u0131 durumlar\u0131 y\u00f6netmek i\u00e7in temel ara\u00e7t\u0131r. Genellikle \u00fc\u00e7 ana durum de\u011fi\u015fkeni kullan\u0131l\u0131r:<\/p>\n<p>1.  <strong><code>data<\/code>:<\/strong> API&#8217;den ba\u015far\u0131l\u0131 bir \u015fekilde \u00e7ekilen veriyi saklar. Ba\u015flang\u0131\u00e7 de\u011feri <code>null<\/code> veya bo\u015f bir dizi\/obje olabilir, beklenen veri tipine g\u00f6re de\u011fi\u015fir.<br \/>\n2.  <strong><code>isLoading<\/code> (veya <code>loading<\/code>):<\/strong> Veri \u00e7ekme i\u015fleminin devam edip etmedi\u011fini g\u00f6steren bir boolean bayra\u011f\u0131d\u0131r. <code>true<\/code> ise y\u00fckleme s\u00fcr\u00fcyor demektir, <code>false<\/code> ise i\u015flem tamamlanm\u0131\u015ft\u0131r. Kullan\u0131c\u0131ya bir y\u00fckleme g\u00f6stergesi (spinner, iskelet ekran) g\u00f6stermek i\u00e7in kullan\u0131l\u0131r.<br \/>\n3.  <strong><code>error<\/code>:<\/strong> API \u00e7a\u011fr\u0131s\u0131 s\u0131ras\u0131nda meydana gelen herhangi bir hatay\u0131 saklar. Ba\u015flang\u0131\u00e7 de\u011feri <code>null<\/code> olabilir. Bir hata olu\u015ftu\u011funda, bu de\u011fi\u015fken hata nesnesini veya mesaj\u0131n\u0131 i\u00e7erir ve kullan\u0131c\u0131ya hata mesaj\u0131n\u0131 g\u00f6stermek i\u00e7in kullan\u0131l\u0131r.<\/p>\n<p>Bu durum de\u011fi\u015fkenlerinin API \u00e7a\u011fr\u0131s\u0131 ya\u015fam d\u00f6ng\u00fcs\u00fcndeki ak\u0131\u015f\u0131 \u015f\u00f6yledir:<\/p>\n<p>1.  <strong>\u00c7a\u011fr\u0131 Ba\u015flamadan \u00d6nce:<\/strong><br \/>\n    *   <code>setLoading(true)<\/code><br \/>\n    *   <code>setError(null)<\/code> (\u00f6nceki hatalar\u0131 temizlemek i\u00e7in)<br \/>\n2.  <strong>\u00c7a\u011fr\u0131 Ba\u015far\u0131l\u0131 Oldu\u011funda:<\/strong><br \/>\n    *   <code>setData(gelenVeri)<\/code><br \/>\n    *   <code>setLoading(false)<\/code><br \/>\n3.  <strong>\u00c7a\u011fr\u0131 Ba\u015far\u0131s\u0131z Oldu\u011funda:<\/strong><br \/>\n    *   <code>setError(hataObjesi)<\/code><br \/>\n    *   <code>setLoading(false)<\/code><br \/>\n4.  <strong><code>finally<\/code> Blo\u011funda:<\/strong> <code>setLoading(false)<\/code> genellikle <code>try...catch<\/code> blo\u011funun <code>finally<\/code> k\u0131sm\u0131nda \u00e7a\u011fr\u0131l\u0131r, b\u00f6ylece hem ba\u015far\u0131l\u0131 hem de ba\u015far\u0131s\u0131z durumlarda y\u00fckleme durumu do\u011fru bir \u015fekilde kapan\u0131r.<\/p>\n<p>Yukar\u0131daki \u00f6rnekte bu ak\u0131\u015f\u0131 zaten g\u00f6rm\u00fc\u015ft\u00fck. Bu durumlar\u0131 kullanarak bile\u015fen i\u00e7inde ko\u015fullu renderlama yapmak, kullan\u0131c\u0131 deneyimini \u00f6nemli \u00f6l\u00e7\u00fcde art\u0131r\u0131r:<\/p>\n<pre><code class=\"language-javascript\">\/\/ ... (\u00f6nceki import ve useState tan\u0131mlamalar\u0131)\n\nfunction MyComponentWithStateManagement() {\n  const [posts, setPosts] = useState([]); \/\/ Bir dizi bekledi\u011fimiz i\u00e7in ba\u015flang\u0131\u00e7 de\u011feri bo\u015f dizi\n  const [loading, setLoading] = useState(true);\n  const [error, setError] = useState(null);\n\n  useEffect(() => {\n    const fetchPosts = async () => {\n      setLoading(true); \/\/ Y\u00fckleme ba\u015flad\u0131\n      setError(null);   \/\/ \u00d6nceki hatalar\u0131 temizle\n      try {\n        const response = await fetch('https:\/\/jsonplaceholder.typicode.com\/posts');\n        if (!response.ok) {\n          throw new Error(<code>HTTP hatas\u0131! Durum: ${response.status}<\/code>);\n        }\n        const data = await response.json();\n        setPosts(data); \/\/ Veri ba\u015far\u0131yla al\u0131nd\u0131\n      } catch (err) {\n        setError(err); \/\/ Hata olu\u015ftu\n      } finally {\n        setLoading(false); \/\/ Y\u00fckleme tamamland\u0131 (ba\u015far\u0131l\u0131 veya ba\u015far\u0131s\u0131z)\n      }\n    };\n\n    fetchPosts();\n  }, []);\n\n  if (loading) {\n    return <div style={{ textAlign: 'center', padding: '20px' }}>\n             <p>G\u00f6nderiler y\u00fckleniyor...<\/p>\n             {\/<em> Buraya bir spinner veya iskelet ekran eklenebilir <\/em>\/}\n           <\/div>;\n  }\n\n  if (error) {\n    return <div style={{ color: 'red', textAlign: 'center', padding: '20px' }}>\n             <p>Veri \u00e7ekilirken bir hata olu\u015ftu: {error.message}<\/p>\n           <\/div>;\n  }\n\n  return (\n    <div style={{ padding: '20px' }}>\n      \n      {posts.map(post => (\n        <div key={post.id} style={{ border: '1px solid #ccc', margin: '10px 0', padding: '15px' }}>\n          <h3>{post.title}<\/h3>\n          <p>{post.body}<\/p>\n        <\/div>\n      ))}\n    <\/div>\n  );\n}\n\nexport default MyComponentWithStateManagement;<\/code><\/pre>\n<p>Bu \u00f6rnek, kullan\u0131c\u0131ya ak\u0131c\u0131 bir deneyim sunmak i\u00e7in y\u00fckleme ve hata durumlar\u0131n\u0131n nas\u0131l y\u00f6netildi\u011fini daha net g\u00f6sterir.<\/p>\n<h3>Ba\u011f\u0131ml\u0131l\u0131k Dizisi ve Kontroll\u00fc Yeniden \u00c7al\u0131\u015fma<\/h3>\n<p><code>useEffect<\/code> hook&#8217;unun ikinci arg\u00fcman\u0131 olan ba\u011f\u0131ml\u0131l\u0131k dizisi, performans ve do\u011fru \u00e7al\u0131\u015fma a\u00e7\u0131s\u0131ndan kritik \u00f6neme sahiptir. Bu dizi, <code>useEffect<\/code> i\u00e7indeki yan etkinin ne zaman yeniden \u00e7al\u0131\u015ft\u0131r\u0131laca\u011f\u0131n\u0131 belirler.<\/p>\n<h4>1. Bo\u015f Ba\u011f\u0131ml\u0131l\u0131k Dizisi (<code>[]<\/code>)<\/h4>\n<p><code>useEffect<\/code>&#8216;in sadece bile\u015fen ilk monte edildi\u011finde \u00e7al\u0131\u015fmas\u0131n\u0131 sa\u011flar. Bu, s\u0131n\u0131f bile\u015fenlerindeki <code>componentDidMount<\/code> metoduna kar\u015f\u0131l\u0131k gelir. Genellikle bir bile\u015fenin ya\u015fam d\u00f6ng\u00fcs\u00fcnde yaln\u0131zca bir kez yap\u0131lmas\u0131 gereken veri \u00e7ekme i\u015flemleri i\u00e7in kullan\u0131l\u0131r.<\/p>\n<pre><code class=\"language-javascript\">useEffect(() => {\n  \/\/ Bu kod sadece bile\u015fen ilk kez DOM'a eklendi\u011finde \u00e7al\u0131\u015f\u0131r.\n  \/\/ \u00d6rnek: \u0130lk sayfa y\u00fcklendi\u011finde bir listeyi \u00e7ekmek.\n  fetch('https:\/\/api.example.com\/initial-data').then(...);\n}, []); \/\/ Bo\u015f dizi<\/code><\/pre>\n<h4>2. Ba\u011f\u0131ml\u0131l\u0131k Dizisi Yok<\/h4>\n<p>E\u011fer ikinci arg\u00fcman olarak ba\u011f\u0131ml\u0131l\u0131k dizisi belirtilmezse, <code>useEffect<\/code> bile\u015fen her render edildi\u011finde \u00e7al\u0131\u015f\u0131r. Bu, genellikle istenmeyen bir durumdur ve sonsuz d\u00f6ng\u00fclere yol a\u00e7abilir, \u00f6zellikle <code>useState<\/code> g\u00fcncellemeleri i\u00e7eriyorsa.<\/p>\n<pre><code class=\"language-javascript\">useEffect(() => {\n  \/\/ D\u0130KKAT: Bu kod her render'da \u00e7al\u0131\u015f\u0131r!\n  \/\/ E\u011fer bu i\u00e7inde bir state g\u00fcncelleniyorsa, sonsuz d\u00f6ng\u00fcye girebilirsiniz.\n  console.log('Her renderda \u00e7al\u0131\u015f\u0131yorum!');\n}); \/\/ Ba\u011f\u0131ml\u0131l\u0131k dizisi yok<\/code><\/pre>\n<h4>3. De\u011ferler \u0130\u00e7eren Ba\u011f\u0131ml\u0131l\u0131k Dizisi (<code>[value1, value2]<\/code>)<\/h4>\n<p><code>useEffect<\/code> i\u00e7indeki yan etkinin, dizideki de\u011ferlerden herhangi biri bir \u00f6nceki render&#8217;dan farkl\u0131ysa yeniden \u00e7al\u0131\u015fmas\u0131n\u0131 sa\u011flar. Bu, belirli prop veya state de\u011fi\u015fikliklerine tepki vermek i\u00e7in idealdir. \u00d6rne\u011fin, bir kullan\u0131c\u0131n\u0131n ID&#8217;si de\u011fi\u015fti\u011finde o kullan\u0131c\u0131n\u0131n verilerini \u00e7ekmek gibi.<\/p>\n<pre><code class=\"language-javascript\">import React, { useState, useEffect } from 'react';\n\nfunction UserProfile({ userId }) {\n  const [user, setUser] = useState(null);\n  const [loading, setLoading] = useState(true);\n  const [error, setError] = useState(null);\n\n  useEffect(() => {\n    const fetchUser = async () => {\n      setLoading(true);\n      setError(null);\n      try {\n        const response = await fetch(<code>https:\/\/jsonplaceholder.typicode.com\/users\/${userId}<\/code>);\n        if (!response.ok) {\n          throw new Error(<code>Kullan\u0131c\u0131 bulunamad\u0131! Durum: ${response.status}<\/code>);\n        }\n        const data = await response.json();\n        setUser(data);\n      } catch (err) {\n        setError(err);\n      } finally {\n        setLoading(false);\n      }\n    };\n\n    if (userId) { \/\/ userId'nin ge\u00e7erli oldu\u011fundan emin ol\n      fetchUser();\n    } else {\n      setUser(null);\n      setLoading(false);\n    }\n    \n  }, [userId]); \/\/ userId de\u011fi\u015fti\u011finde useEffect yeniden \u00e7al\u0131\u015f\u0131r\n\n  if (loading) return <div>Kullan\u0131c\u0131 bilgileri y\u00fckleniyor...<\/div>;\n  if (error) return <div>Hata: {error.message}<\/div>;\n  if (!user) return <div>L\u00fctfen bir kullan\u0131c\u0131 se\u00e7in.<\/div>;\n\n  return (\n    <div>\n      <h2>Kullan\u0131c\u0131 Profili: {user.name}<\/h2>\n      <p>E-posta: {user.email}<\/p>\n      <p>\u015eehir: {user.address.city}<\/p>\n    <\/div>\n  );\n}\n\nexport default UserProfile;<\/code><\/pre>\n<p>Bu \u00f6rnekte, <code>userId<\/code> prop&#8217;u <code>useEffect<\/code>&#8216;in ba\u011f\u0131ml\u0131l\u0131k dizisine dahil edilmi\u015ftir. Bu sayede, <code>UserProfile<\/code> bile\u015fenine farkl\u0131 bir <code>userId<\/code> prop&#8217;u geldi\u011finde (\u00f6rne\u011fin bir \u00fcst bile\u015fenden), <code>useEffect<\/code> yeniden \u00e7al\u0131\u015facak ve yeni kullan\u0131c\u0131 i\u00e7in veri \u00e7ekecektir.<\/p>\n<p><strong>\u00d6nemli Not:<\/strong> Ba\u011f\u0131ml\u0131l\u0131k dizisine eklenen her de\u011fi\u015fken, <code>useEffect<\/code>&#8216;in do\u011fru \u00e7al\u0131\u015fmas\u0131 i\u00e7in stabil olmal\u0131d\u0131r. E\u011fer diziye bir obje veya fonksiyon gibi referans tipli bir de\u011fi\u015fken ekler ve bu de\u011fi\u015fken her render&#8217;da yeniden olu\u015fturulursa (\u00f6rne\u011fin, do\u011frudan <code>useEffect<\/code> i\u00e7inde bir obje olu\u015fturup ba\u011f\u0131ml\u0131l\u0131k olarak vermek), <code>useEffect<\/code> her zaman bu de\u011fi\u015fkenin de\u011fi\u015fti\u011fini d\u00fc\u015f\u00fcnecek ve sonsuz bir d\u00f6ng\u00fcye girecektir. Bu t\u00fcr durumlar i\u00e7in <code>useCallback<\/code> veya <code>useMemo<\/code> hook&#8217;lar\u0131 kullan\u0131labilir, ancak \u00e7o\u011fu basit API \u00e7a\u011fr\u0131s\u0131 senaryosunda bu kadar ileri gitmeye gerek kalmaz.<\/p>\n<h3>Hata Y\u00f6netimi<\/h3>\n<p>API \u00e7a\u011fr\u0131lar\u0131nda hata y\u00f6netimi, uygulaman\u0131n sa\u011flaml\u0131\u011f\u0131 ve kullan\u0131c\u0131 deneyimi i\u00e7in kritik \u00f6neme sahiptir. A\u011f hatalar\u0131, sunucu hatalar\u0131 (4xx, 5xx), veya API&#8217;den gelen ge\u00e7ersiz yan\u0131tlar gibi \u00e7e\u015fitli sorunlarla kar\u015f\u0131la\u015f\u0131labilir.<\/p>\n<p><code>fetch<\/code> API&#8217;si, a\u011f hatalar\u0131 (\u00f6rne\u011fin, internet ba\u011flant\u0131s\u0131 yok) durumunda bir Promise&#8217;i reddeder, ancak HTTP durum kodlar\u0131 (\u00f6rne\u011fin, 404 Not Found veya 500 Internal Server Error) durumunda Promise&#8217;i reddetmez; bunun yerine <code>response.ok<\/code> \u00f6zelli\u011fini <code>false<\/code> olarak ayarlar. Bu nedenle, hem a\u011f hatalar\u0131n\u0131 hem de HTTP durum hatalar\u0131n\u0131 ayr\u0131 ayr\u0131 ele almak \u00f6nemlidir.<\/p>\n<pre><code class=\"language-javascript\">\/\/ ... (\u00f6nceki import ve useState tan\u0131mlamalar\u0131)\n\nfunction ErrorHandlingComponent() {\n  const [data, setData] = useState(null);\n  const [loading, setLoading] = useState(true);\n  const [error, setError] = useState(null);\n\n  useEffect(() => {\n    const fetchData = async () => {\n      setLoading(true);\n      setError(null);\n      try {\n        const response = await fetch('https:\/\/jsonplaceholder.typicode.com\/nonexistent-endpoint'); \/\/ Bilerek hatal\u0131 bir URL\n        \n        \/\/ HTTP durum kodunu kontrol et\n        if (!response.ok) {\n          \/\/ Hata durumunda response.json() ile sunucudan gelen hata mesaj\u0131n\u0131 almaya \u00e7al\u0131\u015fabiliriz\n          const errorData = await response.json().catch(() => ({ message: 'Bilinmeyen sunucu hatas\u0131.' }));\n          throw new Error(<code>HTTP hatas\u0131! Durum: ${response.status} - ${errorData.message || response.statusText}<\/code>);\n        }\n        \n        const result = await response.json();\n        setData(result);\n      } catch (err) {\n        \/\/ A\u011f hatalar\u0131 veya yukar\u0131daki throw new Error yakalan\u0131r\n        console.error(\"Veri \u00e7ekme s\u0131ras\u0131nda bir hata olu\u015ftu:\", err);\n        setError(err);\n      } finally {\n        setLoading(false);\n      }\n    };\n\n    fetchData();\n  }, []);\n\n  if (loading) return <div>Y\u00fckleniyor...<\/div>;\n  if (error) return <div style={{ color: 'red' }}>Hata: {error.message}<\/div>;\n\n  return (\n    <div>\n      <h2>API'den Gelen Veri:<\/h2>\n      {data ? <p>{data.title}<\/p> : <p>Veri bulunamad\u0131.<\/p>}\n    <\/div>\n  );\n}\n\nexport default ErrorHandlingComponent;<\/code><\/pre>\n<p>Bu \u00f6rnekte:<br \/>\n*   <code>try...catch<\/code> blo\u011fu, hem <code>fetch<\/code> Promise&#8217;inin reddedilmesi durumunda (a\u011f hatas\u0131) hem de bizim manuel olarak <code>throw new Error<\/code> ile f\u0131rlatt\u0131\u011f\u0131m\u0131z durumlarda (HTTP durum hatas\u0131) hatalar\u0131 yakalar.<br \/>\n*   <code>response.ok<\/code> kontrol\u00fc, 200-299 aral\u0131\u011f\u0131nda olmayan HTTP durum kodlar\u0131n\u0131 yakalamak i\u00e7in kullan\u0131l\u0131r.<br \/>\n*   <code>response.json().catch(() => ...)<\/code> ile, sunucudan gelen hata mesaj\u0131n\u0131 (e\u011fer varsa) almaya \u00e7al\u0131\u015f\u0131r\u0131z. E\u011fer JSON parse edilemezse, varsay\u0131lan bir hata mesaj\u0131 kullan\u0131l\u0131r.<br \/>\n*   <code>setError(err)<\/code> ile hata durumunu g\u00fcncelleyip kullan\u0131c\u0131ya g\u00f6steririz.<\/p>\n<h3>Temizleme Fonksiyonlar\u0131<\/h3>\n<p><code>useEffect<\/code> hook&#8217;u, bile\u015fen kald\u0131r\u0131ld\u0131\u011f\u0131nda (unmount) veya ba\u011f\u0131ml\u0131l\u0131klar de\u011fi\u015fti\u011finde \u00f6nceki yan etkinin temizlenmesini sa\u011flayan bir fonksiyon d\u00f6nd\u00fcrebilir. Bu temizleme fonksiyonu, \u00f6zellikle abonelikleri iptal etmek, zamanlay\u0131c\u0131lar\u0131 durdurmak veya devam eden a\u011f isteklerini iptal etmek gibi durumlarda bellek s\u0131z\u0131nt\u0131lar\u0131n\u0131 ve istenmeyen davran\u0131\u015flar\u0131 \u00f6nlemek i\u00e7in \u00e7ok \u00f6nemlidir.<\/p>\n<p>API \u00e7a\u011fr\u0131lar\u0131 s\u00f6z konusu oldu\u011funda, bir bile\u015fen kald\u0131r\u0131lmadan \u00f6nce devam eden bir <code>fetch<\/code> iste\u011fini iptal etmek, &#8220;Can&#8217;t perform a React state update on an unmounted component&#8221; (Kald\u0131r\u0131lm\u0131\u015f bir bile\u015fende React durum g\u00fcncellemesi yap\u0131lamaz) uyar\u0131s\u0131n\u0131 \u00f6nlemenin yayg\u0131n bir yoludur. <code>fetch<\/code> API&#8217;si do\u011frudan bir iptal mekanizmas\u0131na sahip olmasa da, <code>AbortController<\/code> API&#8217;si bu i\u015flevi sa\u011flar.<\/p>\n<pre><code class=\"language-javascript\">import React, { useState, useEffect } from 'react';\n\nfunction AbortableFetchComponent() {\n  const [data, setData] = useState(null);\n  const [loading, setLoading] = useState(true);\n  const [error, setError] = useState(null);\n\n  useEffect(() => {\n    const abortController = new AbortController(); \/\/ Yeni bir AbortController olu\u015ftur\n    const signal = abortController.signal; \/\/ \u0130ptal sinyalini al\n\n    const fetchData = async () => {\n      setLoading(true);\n      setError(null);\n      try {\n        const response = await fetch('https:\/\/jsonplaceholder.typicode.com\/posts\/1', { signal }); \/\/ \u0130stekle birlikte sinyali g\u00f6nder\n        \n        if (!response.ok) {\n          throw new Error(<code>HTTP hatas\u0131! Durum: ${response.status}<\/code>);\n        }\n        \n        const result = await response.json();\n        setData(result);\n      } catch (err) {\n        \/\/ E\u011fer hata AbortError ise, iste\u011fin iptal edildi\u011fi anlam\u0131na gelir.\n        \/\/ Bu durumda state g\u00fcncellemesi yapmay\u0131z.\n        if (err.name === 'AbortError') {\n          console.log('Fetch iste\u011fi iptal edildi.');\n        } else {\n          setError(err);\n        }\n      } finally {\n        setLoading(false);\n      }\n    };\n\n    fetchData();\n\n    \/\/ Temizleme fonksiyonu: Bile\u015fen kald\u0131r\u0131ld\u0131\u011f\u0131nda veya ba\u011f\u0131ml\u0131l\u0131klar de\u011fi\u015fti\u011finde \u00e7al\u0131\u015f\u0131r.\n    return () => {\n      abortController.abort(); \/\/ Devam eden iste\u011fi iptal et\n    };\n  }, []); \/\/ Ba\u011f\u0131ml\u0131l\u0131k dizisi bo\u015f\n\n  if (loading) return <div>Y\u00fckleniyor...<\/div>;\n  if (error) return <div style={{ color: 'red' }}>Hata: {error.message}<\/div><\/div>;\n\n  return (\n    <div>\n      <h2>API'den Gelen Veri (\u0130ptal Edilebilir):<\/h2>\n      <p>Ba\u015fl\u0131k: {data.title}<\/p>\n      <p>\u0130\u00e7erik: {data.body}<\/p>\n    <\/div>\n  );\n}\n\nexport default AbortableFetchComponent;<\/code><\/pre>\n<p>Bu \u00f6rnekte:<br \/>\n1.  <code>AbortController<\/code> nesnesi olu\u015fturulur ve <code>signal<\/code> \u00f6zelli\u011fi <code>fetch<\/code> iste\u011fine <code>signal<\/code> se\u00e7ene\u011fi olarak ge\u00e7irilir.<br \/>\n2.  <code>useEffect<\/code>&#8216;ten d\u00f6nen temizleme fonksiyonunda <code>abortController.abort()<\/code> \u00e7a\u011fr\u0131l\u0131r. Bu, <code>fetch<\/code> iste\u011fini iptal eder.<br \/>\n3.  <code>catch<\/code> blo\u011funda, hatan\u0131n <code>AbortError<\/code> olup olmad\u0131\u011f\u0131n\u0131 kontrol ederiz. E\u011fer \u00f6yleyse, bu bir iptal hatas\u0131d\u0131r ve genellikle kullan\u0131c\u0131ya g\u00f6sterilmesi gereken ger\u00e7ek bir hata de\u011fildir, bu y\u00fczden <code>setError<\/code> \u00e7a\u011fr\u0131s\u0131ndan ka\u00e7\u0131n\u0131r\u0131z.<\/p>\n<p>Bu mekanizma, \u00f6zellikle kullan\u0131c\u0131 bir sayfadan h\u0131zl\u0131ca ayr\u0131ld\u0131\u011f\u0131nda veya bir bile\u015fen dinamik olarak kald\u0131r\u0131ld\u0131\u011f\u0131nda, gereksiz a\u011f trafi\u011fini ve React&#8217;in kald\u0131rm\u0131\u015f oldu\u011fu bir bile\u015fende durum g\u00fcncellemesi yapmaya \u00e7al\u0131\u015fmas\u0131ndan kaynaklanan uyar\u0131lar\u0131 \u00f6nler.<\/p>\n<h3>Geli\u015fmi\u015f Kullan\u0131m Senaryolar\u0131 ve \u0130pu\u00e7lar\u0131<\/h3>\n<p><code>useEffect<\/code> ile API \u00e7a\u011fr\u0131lar\u0131 yapmak temel d\u00fczeyde yeterli olsa da, daha karma\u015f\u0131k uygulamalar ve daha iyi geli\u015ftirici deneyimi i\u00e7in baz\u0131 geli\u015fmi\u015f teknikler ve k\u00fct\u00fcphaneler mevcuttur.<\/p>\n<h4>1. Custom Hooks (\u00d6zel Hook&#8217;lar)<\/h4>\n<p>API \u00e7a\u011fr\u0131s\u0131 mant\u0131\u011f\u0131n\u0131 birden fazla bile\u015fende kullanman\u0131z gerekti\u011finde, bu mant\u0131\u011f\u0131 \u00f6zel bir hook i\u00e7ine kaps\u00fcllemek \u00e7ok faydal\u0131d\u0131r. Bu, kod tekrar\u0131n\u0131 azalt\u0131r, okunabilirli\u011fi art\u0131r\u0131r ve test edilebilirli\u011fi kolayla\u015ft\u0131r\u0131r.<\/p>\n<pre><code class=\"language-javascript\">\/\/ useFetch.js\nimport { useState, useEffect } from 'react';\n\nfunction useFetch(url, options) {\n  const [data, setData] = useState(null);\n  const [loading, setLoading] = useState(true);\n  const [error, setError] = useState(null);\n\n  useEffect(() => {\n    const abortController = new AbortController();\n    const signal = abortController.signal;\n\n    const fetchData = async () => {\n      setLoading(true);\n      setError(null);\n      try {\n        const response = await fetch(url, { ...options, signal });\n        if (!response.ok) {\n          throw new Error(<code>HTTP hatas\u0131! Durum: ${response.status}<\/code>);\n        }\n        const result = await response.json();\n        setData(result);\n      } catch (err) {\n        if (err.name === 'AbortError') {\n          console.log('Fetch iste\u011fi iptal edildi:', url);\n        } else {\n          setError(err);\n        }\n      } finally {\n        setLoading(false);\n      }\n    };\n\n    if (url) { \/\/ URL varsa iste\u011fi yap\n      fetchData();\n    } else { \/\/ URL yoksa, hemen y\u00fcklemeyi bitir\n      setLoading(false);\n    }\n\n    return () => {\n      abortController.abort();\n    };\n  }, [url, JSON.stringify(options)]); \/\/ URL veya options de\u011fi\u015fti\u011finde yeniden \u00e7al\u0131\u015f\n\n  return { data, loading, error };\n}\n\nexport default useFetch;<\/code><\/pre>\n<p>Bu <code>useFetch<\/code> hook&#8217;unu bir bile\u015fende kullanmak \u00e7ok daha temiz olacakt\u0131r:<\/p>\n<pre><code class=\"language-javascript\">\/\/ MyComponentUsingCustomHook.js\nimport React from 'react';\nimport useFetch from '.\/useFetch'; \/\/ useFetch hook'umuzu import ediyoruz\n\nfunction MyComponentUsingCustomHook() {\n  const { data: post, loading, error } = useFetch('https:\/\/jsonplaceholder.typicode.com\/posts\/2');\n\n  if (loading) return <div>Y\u00fckleniyor...<\/div>;\n  if (error) return <div style={{ color: 'red' }}>Hata: {error.message}<\/div>;\n\n  return (\n    <div>\n      <h2>Custom Hook ile Gelen Veri:<\/h2>\n      <p>Ba\u015fl\u0131k: {post.title}<\/p>\n      <p>\u0130\u00e7erik: {post.body}<\/p>\n    <\/div>\n  );\n}\n\nexport default MyComponentUsingCustomHook;<\/code><\/pre>\n<h4>2. Axios K\u00fct\u00fcphanesi<\/h4>\n<p><code>fetch<\/code> API&#8217;si harika olsa da, Axios gibi \u00fc\u00e7\u00fcnc\u00fc taraf bir k\u00fct\u00fcphane, API \u00e7a\u011fr\u0131lar\u0131 i\u00e7in ek \u00f6zellikler ve daha rahat bir kullan\u0131m sunar:<br \/>\n*   Otomatik JSON d\u00f6n\u00fc\u015ft\u00fcrme<br \/>\n*   \u0130stek\/Yan\u0131t interceptor&#8217;lar\u0131<br \/>\n*   Daha iyi hata y\u00f6netimi (HTTP durum kodlar\u0131 i\u00e7in Promise&#8217;i otomatik reddetme)<br \/>\n*   \u0130ste\u011fi iptal etme (yerle\u015fik <code>cancelToken<\/code>)<\/p>\n<p>Axios ile bir <code>useEffect<\/code> \u00e7a\u011fr\u0131s\u0131 \u015f\u00f6yle g\u00f6r\u00fcnebilir:<\/p>\n<pre><code class=\"language-javascript\">import React, { useState, useEffect } from 'react';\nimport axios from 'axios';\n\nfunction AxiosFetchComponent() {\n  const [todos, setTodos] = useState([]);\n  const [loading, setLoading] = useState(true);\n  const [error, setError] = useState(null);\n\n  useEffect(() => {\n    const source = axios.CancelToken.source(); \/\/ Axios iptal token'\u0131\n    \n    const fetchTodos = async () => {\n      setLoading(true);\n      setError(null);\n      try {\n        const response = await axios.get('https:\/\/jsonplaceholder.typicode.com\/todos', {\n          cancelToken: source.token \/\/ \u0130ptal token'\u0131n\u0131 iste\u011fe ekle\n        });\n        setTodos(response.data);\n      } catch (err) {\n        if (axios.isCancel(err)) {\n          console.log('Axios iste\u011fi iptal edildi:', err.message);\n        } else {\n          setError(err);\n        }\n      } finally {\n        setLoading(false);\n      }\n    };\n\n    fetchTodos();\n\n    return () => {\n      source.cancel('\u0130stek temizleme s\u0131ras\u0131nda iptal edildi.'); \/\/ Temizleme fonksiyonunda iptal et\n    };\n  }, []);\n\n  if (loading) return <div>Yap\u0131lacaklar y\u00fckleniyor...<\/div>;\n  if (error) return <div style={{ color: 'red' }}>Hata: {error.message}<\/div>;\n\n  return (\n    <div>\n      <h2>Yap\u0131lacaklar Listesi (Axios ile)<\/h2>\n      <ul>\n        {todos.slice(0, 5).map(todo => ( \/\/ \u0130lk 5 tanesini g\u00f6sterelim\n          <li key={todo.id}>{todo.title} - {todo.completed ? 'Tamamland\u0131' : 'Bekliyor'}<\/li>\n        ))}\n      <\/ul>\n    <\/div>\n  );\n}\n\nexport default AxiosFetchComponent;<\/code><\/pre>\n<h4>3. Veri \u00d6nbellekleme ve Durum Y\u00f6netimi K\u00fct\u00fcphaneleri<\/h4>\n<p>B\u00fcy\u00fck \u00f6l\u00e7ekli uygulamalarda, API \u00e7a\u011fr\u0131lar\u0131n\u0131 sadece bir kez yapmak, veriyi \u00f6nbelle\u011fe almak, arka planda yeniden do\u011frulamak, senkronizasyon sa\u011flamak ve global durumu y\u00f6netmek gibi ihtiya\u00e7lar ortaya \u00e7\u0131kar. Bu durumlar i\u00e7in <code>React Query<\/code> (TanStack Query) veya <code>SWR<\/code> gibi k\u00fct\u00fcphaneler <code>useEffect<\/code>&#8216;e g\u00f6re \u00e7ok daha geli\u015fmi\u015f \u00e7\u00f6z\u00fcmler sunar. Bu k\u00fct\u00fcphaneler, <code>useEffect<\/code>&#8216;in \u00fczerine in\u015fa edilmi\u015f olsa da, veri \u00e7ekme, \u00f6nbellekleme, hata y\u00f6netimi ve y\u00fckleme durumlar\u0131 gibi karma\u015f\u0131k senaryolar\u0131 otomatikle\u015ftirerek geli\u015ftiriciye b\u00fcy\u00fck kolayl\u0131k sa\u011flarlar.<\/p>\n<p>\u00d6rne\u011fin, React Query ile bir veri \u00e7ekme i\u015flemi sadece birka\u00e7 sat\u0131r kodla yap\u0131labilir ve \u00f6nbellekleme, yeniden deneme, arka plan g\u00fcncelleme gibi bir\u00e7ok \u00f6zellik otomatik olarak gelir.<\/p>\n<pre><code class=\"language-javascript\">\/\/ React Query \u00f6rne\u011fi (kurulum ve Context Provider gerektirir)\nimport { useQuery } from '@tanstack\/react-query';\n\nfunction ReactQueryComponent() {\n  const { isLoading, error, data } = useQuery({\n    queryKey: ['todos'], \/\/ \u00d6nbellek anahtar\u0131\n    queryFn: async () => { \/\/ Veri \u00e7ekme fonksiyonu\n      const response = await fetch('https:\/\/jsonplaceholder.typicode.com\/todos');\n      if (!response.ok) {\n        throw new Error('Network response was not ok');\n      }\n      return response.json();\n    }\n  });\n\n  if (isLoading) return <div>Y\u00fckleniyor...<\/div>;\n  if (error) return <div style={{ color: 'red' }}>Hata: {error.message}<\/div>;\n\n  return (\n    <div>\n      <h2>Yap\u0131lacaklar Listesi (React Query ile)<\/h2>\n      <ul>\n        {data.slice(0, 5).map(todo => (\n          <li key={todo.id}>{todo.title}<\/li>\n        ))}\n      <\/ul>\n    <\/div>\n  );\n  }<\/code><\/pre>\n<p>Bu k\u00fct\u00fcphaneler, <code>useEffect<\/code>&#8216;i do\u011frudan kullanma ihtiyac\u0131n\u0131 azaltarak, veri katman\u0131n\u0131 daha soyut ve y\u00f6netilebilir hale getirir.<\/p>\n<h3>En \u0130yi Uygulamalar ve S\u0131k Yap\u0131lan Hatalar<\/h3>\n<p><code>useEffect<\/code> ile API \u00e7a\u011fr\u0131lar\u0131 yaparken dikkat edilmesi gereken baz\u0131 \u00f6nemli noktalar ve ka\u00e7\u0131n\u0131lmas\u0131 gereken yayg\u0131n hatalar vard\u0131r:<\/p>\n<p>1.  <strong>Yan Etkileri Yal\u0131tma:<\/strong> <code>useEffect<\/code> sadece yan etkiler i\u00e7in kullan\u0131lmal\u0131d\u0131r. Bile\u015fenin render \u00e7\u0131kt\u0131s\u0131n\u0131 do\u011frudan etkilemeyen, ancak d\u0131\u015f d\u00fcnya ile etkile\u015fime giren i\u015flemler i\u00e7in idealdir. Durum g\u00fcncellemelerini <code>useEffect<\/code> d\u0131\u015f\u0131nda, olay i\u015fleyicilerinde yapmak daha uygundur.<br \/>\n2.  <strong>Sonsuz D\u00f6ng\u00fcleri \u00d6nleme:<\/strong> En yayg\u0131n hatalardan biri, ba\u011f\u0131ml\u0131l\u0131k dizisini yanl\u0131\u015f kullanmak veya hi\u00e7 kullanmamakt\u0131r. <code>useEffect<\/code> i\u00e7indeki bir durum g\u00fcncellemesi, bile\u015fenin yeniden render olmas\u0131na neden olabilir ve e\u011fer ba\u011f\u0131ml\u0131l\u0131k dizisi do\u011fru ayarlanmam\u0131\u015fsa, <code>useEffect<\/code> tekrar \u00e7al\u0131\u015farak tekrar bir durum g\u00fcncellemesi tetikleyebilir ve bu bir sonsuz d\u00f6ng\u00fcye yol a\u00e7abilir. Bu nedenle, ba\u011f\u0131ml\u0131l\u0131k dizisine dikkat edin ve referans tipli de\u011fi\u015fkenler i\u00e7in <code>useCallback<\/code> veya <code>useMemo<\/code> kullanmay\u0131 d\u00fc\u015f\u00fcn\u00fcn.<br \/>\n3.  <strong>Temizleme Fonksiyonlar\u0131n\u0131 Kullanma:<\/strong> \u00d6zellikle uzun s\u00fcreli i\u015flemler (abonelikler, zamanlay\u0131c\u0131lar, a\u011f istekleri) i\u00e7in temizleme fonksiyonlar\u0131 mutlaka kullan\u0131lmal\u0131d\u0131r. Bu, bellek s\u0131z\u0131nt\u0131lar\u0131n\u0131 ve &#8220;unmounted component&#8221; uyar\u0131lar\u0131n\u0131 \u00f6nler. <code>AbortController<\/code> bunun i\u00e7in harika bir ara\u00e7t\u0131r.<br \/>\n4.  <strong>Hata Y\u00f6netimini \u0130hmal Etmeme:<\/strong> API \u00e7a\u011fr\u0131lar\u0131 her zaman ba\u015far\u0131s\u0131z olabilir. Uygulaman\u0131z\u0131n bu durumlar\u0131 zarif\u00e7e ele almas\u0131 ve kullan\u0131c\u0131ya anlaml\u0131 geri bildirimler sunmas\u0131 \u00f6nemlidir. <code>try...catch<\/code> bloklar\u0131 ve <code>response.ok<\/code> kontrol\u00fc vazge\u00e7ilmezdir.<br \/>\n5.  <strong>Gereksiz Yeniden \u00c7al\u0131\u015fmalar\u0131 Azaltma:<\/strong> Ba\u011f\u0131ml\u0131l\u0131k dizisini do\u011fru ayarlamak, <code>useEffect<\/code>&#8216;in sadece ger\u00e7ekten gerekti\u011finde \u00e7al\u0131\u015fmas\u0131n\u0131 sa\u011flar. Bu, gereksiz API \u00e7a\u011fr\u0131lar\u0131n\u0131 ve performans sorunlar\u0131n\u0131 \u00f6nler.<br \/>\n6.  <strong>Kullan\u0131c\u0131 Deneyimi:<\/strong> Y\u00fckleme durumlar\u0131n\u0131 (spinner, iskelet ekran\u0131) ve hata mesajlar\u0131n\u0131 a\u00e7\u0131k\u00e7a g\u00f6stermek, kullan\u0131c\u0131 deneyimini \u00f6nemli \u00f6l\u00e7\u00fcde iyile\u015ftirir.<br \/>\n7.  <strong>Custom Hooks ile Soyutlama:<\/strong> Tekrar eden API \u00e7a\u011fr\u0131s\u0131 mant\u0131klar\u0131n\u0131 custom hook&#8217;lar i\u00e7ine ta\u015f\u0131mak, kodunuzu daha mod\u00fcler, yeniden kullan\u0131labilir ve okunabilir hale getirir.<\/p>\n<h3>Sonu\u00e7<\/h3>\n<p><code>useEffect<\/code> hook&#8217;u, React fonksiyonel bile\u015fenlerinde Web API \u00e7a\u011fr\u0131lar\u0131 gibi yan etkileri y\u00f6netmek i\u00e7in g\u00fc\u00e7l\u00fc ve esnek bir ara\u00e7t\u0131r. Bu makalede, <code>useEffect<\/code>&#8216;in temel prensiplerinden ba\u015flayarak, <code>useState<\/code> ile veri durumunu y\u00f6netmeye, ba\u011f\u0131ml\u0131l\u0131k dizisinin do\u011fru kullan\u0131m\u0131na, sa\u011flam hata y\u00f6netimine ve bellek s\u0131z\u0131nt\u0131lar\u0131n\u0131 \u00f6nlemek i\u00e7in temizleme fonksiyonlar\u0131na kadar bir\u00e7ok \u00f6nemli konuyu ele ald\u0131k. Ayr\u0131ca, <code>useFetch<\/code> gibi \u00f6zel hook&#8217;lar olu\u015fturarak kod tekrar\u0131n\u0131 nas\u0131l azaltaca\u011f\u0131m\u0131z\u0131, Axios gibi k\u00fct\u00fcphanelerin sundu\u011fu avantajlar\u0131 ve daha b\u00fcy\u00fck uygulamalar i\u00e7in <code>React Query<\/code> veya <code>SWR<\/code> gibi veri \u00e7ekme k\u00fct\u00fcphanelerinin \u00f6nemini inceledik.<\/p>\n<p><code>useEffect<\/code>&#8216;i do\u011fru bir \u015fekilde anlamak ve kullanmak, React uygulamalar\u0131n\u0131zda dinamik verileri etkili bir \u015fekilde \u00e7ekmenizi, kullan\u0131c\u0131ya ak\u0131c\u0131 bir deneyim sunman\u0131z\u0131 ve uygulaman\u0131z\u0131n performans\u0131n\u0131 ve s\u00fcrd\u00fcr\u00fclebilirli\u011fini art\u0131rman\u0131z\u0131 sa\u011flayacakt\u0131r. Unutmay\u0131n, iyi bir React geli\u015ftiricisi olmak, sadece bile\u015fenleri render etmekle kalmaz, ayn\u0131 zamanda d\u0131\u015f d\u00fcnya ile olan etkile\u015fimleri (yani yan etkileri) ustaca y\u00f6netmekle de ilgilidir.<\/body><\/p>\n","protected":false},"excerpt":{"rendered":"React&#8217;te useEffect Hook&#8217;u ile Web API \u00c7a\u011fr\u0131lar\u0131 Nas\u0131l Yap\u0131l\u0131r?\nReact, modern web uygulamalar\u0131 geli\u015ftirmek i\u00e7in pop\u00fcler bir JavaScript k\u00fct","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"csco_page_header_type":"","csco_page_load_nextpost":"","csco_page_subscribe_form":"","csco_page_contact_form":"","footnotes":""},"categories":[128],"tags":[],"class_list":{"0":"post-37936","1":"post","2":"type-post","3":"status-publish","4":"format-standard","6":"category-react","7":"cs-entry","8":"cs-video-wrap"},"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v20.5 (Yoast SEO v25.3.1) - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>React&#039;te useEffect Hook&#039;u ile Web API \u00c7a\u011fr\u0131lar\u0131 Nas\u0131l Yap\u0131l\u0131r? - Kodlar\u0131n Gizemli D\u00fcnyas\u0131<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/fatihsoysal.com\/blog\/reactte-useeffect-hooku-ile-web-api-cagrilari-nasil-yapilir\/\" \/>\n<meta property=\"og:locale\" content=\"tr_TR\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"React&#039;te useEffect Hook&#039;u ile Web API \u00c7a\u011fr\u0131lar\u0131 Nas\u0131l Yap\u0131l\u0131r?\" \/>\n<meta property=\"og:description\" content=\"React&#039;te useEffect Hook&#039;u ile Web API \u00c7a\u011fr\u0131lar\u0131 Nas\u0131l Yap\u0131l\u0131r? React, modern web uygulamalar\u0131 geli\u015ftirmek i\u00e7in pop\u00fcler bir JavaScript k\u00fct\" \/>\n<meta property=\"og:url\" content=\"https:\/\/fatihsoysal.com\/blog\/reactte-useeffect-hooku-ile-web-api-cagrilari-nasil-yapilir\/\" \/>\n<meta property=\"og:site_name\" content=\"Kodlar\u0131n Gizemli D\u00fcnyas\u0131\" \/>\n<meta property=\"article:published_time\" content=\"2026-01-18T19:40:56+00:00\" \/>\n<meta name=\"author\" content=\"Fatih Soysal\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Yazan:\" \/>\n\t<meta name=\"twitter:data1\" content=\"Fatih Soysal\" \/>\n\t<meta name=\"twitter:label2\" content=\"Tahmini okuma s\u00fcresi\" \/>\n\t<meta name=\"twitter:data2\" content=\"21 dakika\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/fatihsoysal.com\/blog\/reactte-useeffect-hooku-ile-web-api-cagrilari-nasil-yapilir\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/fatihsoysal.com\/blog\/reactte-useeffect-hooku-ile-web-api-cagrilari-nasil-yapilir\/\"},\"author\":{\"name\":\"Fatih Soysal\",\"@id\":\"https:\/\/fatihsoysal.com\/blog\/#\/schema\/person\/002a254750921dcfd568a99e48240dd1\"},\"headline\":\"React&#8217;te useEffect Hook&#8217;u ile Web API \u00c7a\u011fr\u0131lar\u0131 Nas\u0131l Yap\u0131l\u0131r?\",\"datePublished\":\"2026-01-18T19:40:56+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/fatihsoysal.com\/blog\/reactte-useeffect-hooku-ile-web-api-cagrilari-nasil-yapilir\/\"},\"wordCount\":2827,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/fatihsoysal.com\/blog\/#\/schema\/person\/002a254750921dcfd568a99e48240dd1\"},\"articleSection\":[\"React\"],\"inLanguage\":\"tr\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/fatihsoysal.com\/blog\/reactte-useeffect-hooku-ile-web-api-cagrilari-nasil-yapilir\/#respond\"]}],\"copyrightYear\":\"2026\",\"copyrightHolder\":{\"@id\":\"https:\/\/fatihsoysal.com\/blog\/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/fatihsoysal.com\/blog\/reactte-useeffect-hooku-ile-web-api-cagrilari-nasil-yapilir\/\",\"url\":\"https:\/\/fatihsoysal.com\/blog\/reactte-useeffect-hooku-ile-web-api-cagrilari-nasil-yapilir\/\",\"name\":\"React'te useEffect Hook'u ile Web API \u00c7a\u011fr\u0131lar\u0131 Nas\u0131l Yap\u0131l\u0131r? - Kodlar\u0131n Gizemli D\u00fcnyas\u0131\",\"isPartOf\":{\"@id\":\"https:\/\/fatihsoysal.com\/blog\/#website\"},\"datePublished\":\"2026-01-18T19:40:56+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/fatihsoysal.com\/blog\/reactte-useeffect-hooku-ile-web-api-cagrilari-nasil-yapilir\/#breadcrumb\"},\"inLanguage\":\"tr\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/fatihsoysal.com\/blog\/reactte-useeffect-hooku-ile-web-api-cagrilari-nasil-yapilir\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/fatihsoysal.com\/blog\/reactte-useeffect-hooku-ile-web-api-cagrilari-nasil-yapilir\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Anasayfa\",\"item\":\"https:\/\/fatihsoysal.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"React&#8217;te useEffect Hook&#8217;u ile Web API \u00c7a\u011fr\u0131lar\u0131 Nas\u0131l Yap\u0131l\u0131r?\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/fatihsoysal.com\/blog\/#website\",\"url\":\"https:\/\/fatihsoysal.com\/blog\/\",\"name\":\"Fatihsoysal.com\",\"description\":\"Blog - Yaz\u0131l\u0131m D\u00fcnyas\u0131 Tecr\u00fcbelerim\",\"publisher\":{\"@id\":\"https:\/\/fatihsoysal.com\/blog\/#\/schema\/person\/002a254750921dcfd568a99e48240dd1\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/fatihsoysal.com\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"tr\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"https:\/\/fatihsoysal.com\/blog\/#\/schema\/person\/002a254750921dcfd568a99e48240dd1\",\"name\":\"Fatih Soysal\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"tr\",\"@id\":\"https:\/\/fatihsoysal.com\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/fatihsoysal.com\/blog\/wp-content\/uploads\/2024\/04\/cropped-replicate-prediction-3kgg1hgjn5rgp0cf0p5tr0jw7w-1.png\",\"contentUrl\":\"https:\/\/fatihsoysal.com\/blog\/wp-content\/uploads\/2024\/04\/cropped-replicate-prediction-3kgg1hgjn5rgp0cf0p5tr0jw7w-1.png\",\"width\":512,\"height\":512,\"caption\":\"Fatih Soysal\"},\"logo\":{\"@id\":\"https:\/\/fatihsoysal.com\/blog\/#\/schema\/person\/image\/\"},\"description\":\"Kullan\u0131m ve kodlama m\u00fckemmeliyetini odak alan uygulamalar olu\u015fturma deneyimine sahip, profesyonel olarak 15+ y\u0131l \u00fczeri deneyime sahip bir yaz\u0131l\u0131m m\u00fchendisi.\",\"url\":\"https:\/\/fatihsoysal.com\/blog\/author\/fatihsoysal\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"React'te useEffect Hook'u ile Web API \u00c7a\u011fr\u0131lar\u0131 Nas\u0131l Yap\u0131l\u0131r? - Kodlar\u0131n Gizemli D\u00fcnyas\u0131","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/fatihsoysal.com\/blog\/reactte-useeffect-hooku-ile-web-api-cagrilari-nasil-yapilir\/","og_locale":"tr_TR","og_type":"article","og_title":"React'te useEffect Hook'u ile Web API \u00c7a\u011fr\u0131lar\u0131 Nas\u0131l Yap\u0131l\u0131r?","og_description":"React'te useEffect Hook'u ile Web API \u00c7a\u011fr\u0131lar\u0131 Nas\u0131l Yap\u0131l\u0131r? React, modern web uygulamalar\u0131 geli\u015ftirmek i\u00e7in pop\u00fcler bir JavaScript k\u00fct","og_url":"https:\/\/fatihsoysal.com\/blog\/reactte-useeffect-hooku-ile-web-api-cagrilari-nasil-yapilir\/","og_site_name":"Kodlar\u0131n Gizemli D\u00fcnyas\u0131","article_published_time":"2026-01-18T19:40:56+00:00","author":"Fatih Soysal","twitter_card":"summary_large_image","twitter_misc":{"Yazan:":"Fatih Soysal","Tahmini okuma s\u00fcresi":"21 dakika"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/fatihsoysal.com\/blog\/reactte-useeffect-hooku-ile-web-api-cagrilari-nasil-yapilir\/#article","isPartOf":{"@id":"https:\/\/fatihsoysal.com\/blog\/reactte-useeffect-hooku-ile-web-api-cagrilari-nasil-yapilir\/"},"author":{"name":"Fatih Soysal","@id":"https:\/\/fatihsoysal.com\/blog\/#\/schema\/person\/002a254750921dcfd568a99e48240dd1"},"headline":"React&#8217;te useEffect Hook&#8217;u ile Web API \u00c7a\u011fr\u0131lar\u0131 Nas\u0131l Yap\u0131l\u0131r?","datePublished":"2026-01-18T19:40:56+00:00","mainEntityOfPage":{"@id":"https:\/\/fatihsoysal.com\/blog\/reactte-useeffect-hooku-ile-web-api-cagrilari-nasil-yapilir\/"},"wordCount":2827,"commentCount":0,"publisher":{"@id":"https:\/\/fatihsoysal.com\/blog\/#\/schema\/person\/002a254750921dcfd568a99e48240dd1"},"articleSection":["React"],"inLanguage":"tr","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/fatihsoysal.com\/blog\/reactte-useeffect-hooku-ile-web-api-cagrilari-nasil-yapilir\/#respond"]}],"copyrightYear":"2026","copyrightHolder":{"@id":"https:\/\/fatihsoysal.com\/blog\/#organization"}},{"@type":"WebPage","@id":"https:\/\/fatihsoysal.com\/blog\/reactte-useeffect-hooku-ile-web-api-cagrilari-nasil-yapilir\/","url":"https:\/\/fatihsoysal.com\/blog\/reactte-useeffect-hooku-ile-web-api-cagrilari-nasil-yapilir\/","name":"React'te useEffect Hook'u ile Web API \u00c7a\u011fr\u0131lar\u0131 Nas\u0131l Yap\u0131l\u0131r? - Kodlar\u0131n Gizemli D\u00fcnyas\u0131","isPartOf":{"@id":"https:\/\/fatihsoysal.com\/blog\/#website"},"datePublished":"2026-01-18T19:40:56+00:00","breadcrumb":{"@id":"https:\/\/fatihsoysal.com\/blog\/reactte-useeffect-hooku-ile-web-api-cagrilari-nasil-yapilir\/#breadcrumb"},"inLanguage":"tr","potentialAction":[{"@type":"ReadAction","target":["https:\/\/fatihsoysal.com\/blog\/reactte-useeffect-hooku-ile-web-api-cagrilari-nasil-yapilir\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/fatihsoysal.com\/blog\/reactte-useeffect-hooku-ile-web-api-cagrilari-nasil-yapilir\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Anasayfa","item":"https:\/\/fatihsoysal.com\/blog\/"},{"@type":"ListItem","position":2,"name":"React&#8217;te useEffect Hook&#8217;u ile Web API \u00c7a\u011fr\u0131lar\u0131 Nas\u0131l Yap\u0131l\u0131r?"}]},{"@type":"WebSite","@id":"https:\/\/fatihsoysal.com\/blog\/#website","url":"https:\/\/fatihsoysal.com\/blog\/","name":"Fatihsoysal.com","description":"Blog - Yaz\u0131l\u0131m D\u00fcnyas\u0131 Tecr\u00fcbelerim","publisher":{"@id":"https:\/\/fatihsoysal.com\/blog\/#\/schema\/person\/002a254750921dcfd568a99e48240dd1"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/fatihsoysal.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"tr"},{"@type":["Person","Organization"],"@id":"https:\/\/fatihsoysal.com\/blog\/#\/schema\/person\/002a254750921dcfd568a99e48240dd1","name":"Fatih Soysal","image":{"@type":"ImageObject","inLanguage":"tr","@id":"https:\/\/fatihsoysal.com\/blog\/#\/schema\/person\/image\/","url":"https:\/\/fatihsoysal.com\/blog\/wp-content\/uploads\/2024\/04\/cropped-replicate-prediction-3kgg1hgjn5rgp0cf0p5tr0jw7w-1.png","contentUrl":"https:\/\/fatihsoysal.com\/blog\/wp-content\/uploads\/2024\/04\/cropped-replicate-prediction-3kgg1hgjn5rgp0cf0p5tr0jw7w-1.png","width":512,"height":512,"caption":"Fatih Soysal"},"logo":{"@id":"https:\/\/fatihsoysal.com\/blog\/#\/schema\/person\/image\/"},"description":"Kullan\u0131m ve kodlama m\u00fckemmeliyetini odak alan uygulamalar olu\u015fturma deneyimine sahip, profesyonel olarak 15+ y\u0131l \u00fczeri deneyime sahip bir yaz\u0131l\u0131m m\u00fchendisi.","url":"https:\/\/fatihsoysal.com\/blog\/author\/fatihsoysal\/"}]}},"yoast_meta":{"yoast_wpseo_title":"","yoast_wpseo_metadesc":"","yoast_wpseo_canonical":""},"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/fatihsoysal.com\/blog\/wp-json\/wp\/v2\/posts\/37936","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/fatihsoysal.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/fatihsoysal.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/fatihsoysal.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/fatihsoysal.com\/blog\/wp-json\/wp\/v2\/comments?post=37936"}],"version-history":[{"count":1,"href":"https:\/\/fatihsoysal.com\/blog\/wp-json\/wp\/v2\/posts\/37936\/revisions"}],"predecessor-version":[{"id":37937,"href":"https:\/\/fatihsoysal.com\/blog\/wp-json\/wp\/v2\/posts\/37936\/revisions\/37937"}],"wp:attachment":[{"href":"https:\/\/fatihsoysal.com\/blog\/wp-json\/wp\/v2\/media?parent=37936"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fatihsoysal.com\/blog\/wp-json\/wp\/v2\/categories?post=37936"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fatihsoysal.com\/blog\/wp-json\/wp\/v2\/tags?post=37936"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}