{"id":37421,"date":"2026-01-04T03:40:46","date_gmt":"2026-01-04T00:40:46","guid":{"rendered":"https:\/\/fatihsoysal.com\/blog\/?p=37421"},"modified":"2026-01-04T03:40:46","modified_gmt":"2026-01-04T00:40:46","slug":"reactte-sinif-bilesenlerine-genel-bakis","status":"publish","type":"post","link":"https:\/\/fatihsoysal.com\/blog\/reactte-sinif-bilesenlerine-genel-bakis\/","title":{"rendered":"React&#8217;te S\u0131n\u0131f Bile\u015fenlerine Genel Bak\u0131\u015f"},"content":{"rendered":"<p><body><\/p>\n<h2>React&#8217;te S\u0131n\u0131f Bile\u015fenlerine Genel Bak\u0131\u015f<\/h2>\n<p>React, modern web uygulamalar\u0131 geli\u015ftirmek i\u00e7in kullan\u0131lan g\u00fc\u00e7l\u00fc bir JavaScript k\u00fct\u00fcphanesidir. Bile\u015fen tabanl\u0131 mimarisi sayesinde karma\u015f\u0131k kullan\u0131c\u0131 aray\u00fczlerini y\u00f6netilebilir, yeniden kullan\u0131labilir par\u00e7alara ay\u0131rmay\u0131 kolayla\u015ft\u0131r\u0131r. React&#8217;in ilk zamanlar\u0131ndan itibaren temel yap\u0131 ta\u015flar\u0131ndan biri olan s\u0131n\u0131f bile\u015fenleri (Class Components), \u00f6zellikle uygulaman\u0131n durumu (state) ve ya\u015fam d\u00f6ng\u00fcs\u00fc (lifecycle) y\u00f6netimi konusunda merkezi bir rol oynam\u0131\u015ft\u0131r. Her ne kadar React Hooks&#8217;un ortaya \u00e7\u0131k\u0131\u015f\u0131yla fonksiyonel bile\u015fenler daha pop\u00fcler hale gelmi\u015f olsa da, s\u0131n\u0131f bile\u015fenlerini anlamak, React&#8217;in temel prensiplerini kavramak, eski kod tabanlar\u0131n\u0131 s\u00fcrd\u00fcrmek veya hata s\u0131n\u0131rlar\u0131 (error boundaries) gibi \u00f6zel durumlar\u0131 ele almak i\u00e7in hala b\u00fcy\u00fck \u00f6nem ta\u015f\u0131maktad\u0131r.<\/p>\n<p>Bu makalede, React s\u0131n\u0131f bile\u015fenlerinin ne oldu\u011funu, nas\u0131l \u00e7al\u0131\u015ft\u0131\u011f\u0131n\u0131, temel yap\u0131lar\u0131n\u0131, durum ve \u00f6zellik (props) y\u00f6netimini, ya\u015fam d\u00f6ng\u00fcs\u00fc metotlar\u0131n\u0131, olay y\u00f6netimini, referanslar\u0131 ve Context API ile kullan\u0131m\u0131n\u0131 detayl\u0131 bir \u015fekilde inceleyece\u011fiz. Ayr\u0131ca, s\u0131n\u0131f bile\u015fenlerinin avantaj ve dezavantajlar\u0131n\u0131 tart\u0131\u015farak, modern React geli\u015ftirme d\u00fcnyas\u0131ndaki yerini de\u011ferlendirece\u011fiz.<\/p>\n<h3>S\u0131n\u0131f Bile\u015fenlerinin Temel Yap\u0131s\u0131<\/h3>\n<p>React&#8217;te bir s\u0131n\u0131f bile\u015feni olu\u015fturmak i\u00e7in ES6 (ECMAScript 2015) s\u0131n\u0131f s\u00f6zdizimini kullan\u0131r\u0131z. Temel olarak, <code>React.Component<\/code> s\u0131n\u0131f\u0131n\u0131 geni\u015fleten bir JavaScript s\u0131n\u0131f\u0131d\u0131r. Bu miras alma i\u015flemi, bile\u015fenimize React&#8217;in sundu\u011fu \u00f6zel yetenekleri (state, lifecycle metotlar\u0131 vb.) kazand\u0131r\u0131r.<\/p>\n<h4>Bile\u015fen Tan\u0131mlama<\/h4>\n<p>Bir s\u0131n\u0131f bile\u015feninin en temel yap\u0131s\u0131 \u015fu \u015fekildedir:<\/p>\n<pre><code class=\"language-jsx\">import React, { Component } from 'react';\n\nclass MyComponent extends Component {\n  render() {\n    return (\n      <div>\n        \n        <p>Bu benim render metodumdan d\u00f6nen i\u00e7erik.<\/p>\n      <\/div>\n    );\n  }\n}\n\nexport default MyComponent;<\/code><\/pre>\n<p>Yukar\u0131daki \u00f6rnekte:<br \/>\n*   <code>import React, { Component } from 'react';<\/code>: React k\u00fct\u00fcphanesini ve <code>Component<\/code> s\u0131n\u0131f\u0131n\u0131 i\u00e7e aktar\u0131yoruz. <code>Component<\/code> s\u0131n\u0131f\u0131, <code>React.Component<\/code> yerine daha k\u0131sa bir yaz\u0131m sa\u011flar.<br \/>\n*   <code>class MyComponent extends Component { ... }<\/code>: <code>MyComponent<\/code> ad\u0131nda yeni bir s\u0131n\u0131f tan\u0131ml\u0131yoruz ve bu s\u0131n\u0131f\u0131 <code>Component<\/code> s\u0131n\u0131f\u0131ndan t\u00fcretiyoruz.<br \/>\n*   <code>render() { ... }<\/code>: Bu metot, s\u0131n\u0131f bile\u015fenlerinin <strong>mutlaka<\/strong> sahip olmas\u0131 gereken tek metottur. Bile\u015fenin kullan\u0131c\u0131 aray\u00fcz\u00fcnde ne g\u00f6sterece\u011fini belirten JSX (JavaScript XML) kodunu d\u00f6nd\u00fcrmekle sorumludur. <code>render()<\/code> metodu her \u00e7a\u011fr\u0131ld\u0131\u011f\u0131nda (genellikle durum veya \u00f6zellikler de\u011fi\u015fti\u011finde), React sanal DOM&#8217;u g\u00fcnceller ve gerekli de\u011fi\u015fiklikleri ger\u00e7ek DOM&#8217;a yans\u0131t\u0131r.<br \/>\n*   <code>export default MyComponent;<\/code>: Bile\u015fenimizin ba\u015fka dosyalardan i\u00e7e aktar\u0131labilmesini sa\u011flar.<\/p>\n<h3>Durum (State) Y\u00f6netimi<\/h3>\n<p>Durum (state), bir bile\u015fenin zaman i\u00e7inde de\u011fi\u015febilen ve kullan\u0131c\u0131 aray\u00fcz\u00fcn\u00fc etkileyen verilerini temsil eder. S\u0131n\u0131f bile\u015fenlerinde durum, bile\u015fenin kendi i\u00e7inde y\u00f6netilir ve bile\u015fenin ya\u015fam d\u00f6ng\u00fcs\u00fc boyunca de\u011fi\u015febilir.<\/p>\n<h4>Ba\u015flang\u0131\u00e7 Durumu Tan\u0131mlama<\/h4>\n<p>Bir s\u0131n\u0131f bile\u015feninin ba\u015flang\u0131\u00e7 durumunu tan\u0131mlamak i\u00e7in <code>constructor<\/code> metodunu kullan\u0131r\u0131z. <code>constructor<\/code> metodu, bir s\u0131n\u0131f\u0131n bir \u00f6rne\u011fi olu\u015fturuldu\u011funda ilk \u00e7a\u011fr\u0131lan \u00f6zel bir metottur.<\/p>\n<pre><code class=\"language-jsx\">import React, { Component } from 'react';\n\nclass Counter extends Component {\n  constructor(props) {\n    super(props); \/\/ \u00dcst s\u0131n\u0131f\u0131n yap\u0131land\u0131r\u0131c\u0131s\u0131n\u0131 \u00e7a\u011f\u0131rmak zorunludur.\n    this.state = {\n      count: 0,\n      message: \"Say\u0131c\u0131 Uygulamas\u0131\"\n    };\n  }\n\n  render() {\n    return (\n      <div>\n        <h2>{this.state.message}<\/h2>\n        <p>Mevcut Say\u0131: {this.state.count}<\/p>\n      <\/div>\n    );\n  }\n}\n\nexport default Counter;<\/code><\/pre>\n<p>*   <code>constructor(props)<\/code>: Yap\u0131land\u0131r\u0131c\u0131 metot, bile\u015fen olu\u015fturuldu\u011funda \u00e7al\u0131\u015f\u0131r. <code>props<\/code> arg\u00fcman\u0131n\u0131 al\u0131r.<br \/>\n*   <code>super(props)<\/code>: Bu \u00e7a\u011fr\u0131, t\u00fcretilen s\u0131n\u0131f\u0131n yap\u0131land\u0131r\u0131c\u0131s\u0131nda <code>this<\/code> anahtar kelimesini kullanmadan \u00f6nce <strong>mutlaka<\/strong> yap\u0131lmal\u0131d\u0131r. \u00dcst s\u0131n\u0131f\u0131n (<code>Component<\/code>) yap\u0131land\u0131r\u0131c\u0131s\u0131n\u0131 \u00e7a\u011f\u0131r\u0131r ve bile\u015fenin <code>props<\/code>&#8216;lar\u0131n\u0131 do\u011fru \u015fekilde ba\u015flat\u0131r.<br \/>\n*   <code>this.state = { ... };<\/code>: Bile\u015fenin ba\u015flang\u0131\u00e7 durumunu tan\u0131mlad\u0131\u011f\u0131m\u0131z yerdir. <code>state<\/code>, her zaman bir JavaScript nesnesi olmal\u0131d\u0131r.<\/p>\n<h4>Durumu G\u00fcncelleme: <code>this.setState()<\/code><\/h4>\n<p>Durumu do\u011frudan <code>this.state.count = 1;<\/code> gibi atamalarla <strong>asla<\/strong> de\u011fi\u015ftirmemelisiniz. Durumu g\u00fcncellemek i\u00e7in her zaman <code>this.setState()<\/code> metodunu kullanmal\u0131s\u0131n\u0131z. <code>this.setState()<\/code>, React&#8217;e bile\u015fenin durumunun de\u011fi\u015fti\u011fini ve aray\u00fcz\u00fcn yeniden render edilmesi gerekti\u011fini bildirir.<\/p>\n<pre><code class=\"language-jsx\">import React, { Component } from 'react';\n\nclass Counter extends Component {\n  constructor(props) {\n    super(props);\n    this.state = {\n      count: 0\n    };\n    \/\/ Metotlar\u0131 ba\u011flama (binding) - detaylar olay y\u00f6netimi b\u00f6l\u00fcm\u00fcnde\n    this.increment = this.increment.bind(this);\n  }\n\n  increment() {\n    \/\/ this.setState() asenkron \u00e7al\u0131\u015f\u0131r ve durum nesnesini birle\u015ftirir (merge).\n    \/\/ \u00d6nceki duruma ba\u011fl\u0131 g\u00fcncellemeler i\u00e7in fonksiyonel formunu kullanmak daha g\u00fcvenlidir.\n    this.setState((prevState) => ({\n      count: prevState.count + 1\n    }));\n  }\n\n  render() {\n    return (\n      <div>\n        <p>Mevcut Say\u0131: {this.state.count}<\/p>\n        <button onClick={this.increment}>Artt\u0131r<\/button>\n      <\/div>\n    );\n  }\n}\n\nexport default Counter;<\/code><\/pre>\n<p>*   <code>this.setState(updater, [callback])<\/code>: \u0130ki \u015fekilde kullan\u0131labilir:<br \/>\n    *   <strong>Nesne ile:<\/strong> <code>this.setState({ count: this.state.count + 1 })<\/code>. Bu form, g\u00fcncellemeler aras\u0131nda \u00e7ak\u0131\u015fmalar olabilece\u011finden, mevcut duruma ba\u011fl\u0131 g\u00fcncellemeler i\u00e7in \u00f6nerilmez.<br \/>\n    *   <strong>Fonksiyon ile:<\/strong> <code>this.setState((prevState, props) => ({ count: prevState.count + 1 }))<\/code>. Bu, \u00f6nceki duruma ve \u00f6zelliklere g\u00fcvenli bir \u015fekilde eri\u015fmenizi sa\u011flar ve durum g\u00fcncellemelerinin s\u0131ras\u0131n\u0131 garanti eder. React, birden fazla <code>setState<\/code> \u00e7a\u011fr\u0131s\u0131n\u0131 tek bir g\u00fcncellemede birle\u015ftirebilir (batching).<br \/>\n*   <code>this.setState()<\/code> asenkron \u00e7al\u0131\u015f\u0131r. Yani, <code>setState<\/code> \u00e7a\u011fr\u0131ld\u0131ktan hemen sonra <code>this.state<\/code>&#8216;in g\u00fcncellenmi\u015f de\u011feri garanti edilmez. G\u00fcncelleme tamamland\u0131ktan sonra bir i\u015flem yapmak isterseniz, ikinci arg\u00fcman olarak bir geri \u00e7a\u011f\u0131rma (callback) fonksiyonu sa\u011flayabilirsiniz: <code>this.setState({ count: 1 }, () => console.log('Durum g\u00fcncellendi:', this.state.count));<\/code><\/p>\n<h3>\u00d6zellikler (Props) Kullan\u0131m\u0131<\/h3>\n<p>\u00d6zellikler (props), bir \u00fcst bile\u015fenden alt bile\u015fenlere veri aktarmak i\u00e7in kullan\u0131l\u0131r. Props&#8217;lar &#8220;\u00f6zellikler&#8221; anlam\u0131na gelir ve bir bile\u015fenin d\u0131\u015far\u0131dan ald\u0131\u011f\u0131 yap\u0131land\u0131rma parametreleri gibidir. Props&#8217;lar <strong>salt okunurdur (read-only)<\/strong> ve alt bile\u015fenler taraf\u0131ndan de\u011fi\u015ftirilemez.<\/p>\n<pre><code class=\"language-jsx\">\/\/ ParentComponent.js\nimport React, { Component } from 'react';\nimport ChildComponent from '.\/ChildComponent';\n\nclass ParentComponent extends Component {\n  render() {\n    const userName = \"Alice\";\n    const userAge = 30;\n    return (\n      <div>\n        \n        <ChildComponent name={userName} age={userAge} \/>\n        <ChildComponent name=\"Bob\" age={25} \/>\n      <\/div>\n    );\n  }\n}\n\nexport default ParentComponent;<\/code><\/pre>\n<pre><code class=\"language-jsx\">\/\/ ChildComponent.js\nimport React, { Component } from 'react';\n\nclass ChildComponent extends Component {\n  render() {\n    \/\/ Props'lara this.props \u00fczerinden eri\u015filir.\n    const { name, age } = this.props;\n    return (\n      <div>\n        <h3>\u00c7ocuk Bile\u015fen<\/h3>\n        <p>Ad\u0131: {name}<\/p>\n        <p>Ya\u015f: {age}<\/p>\n      <\/div>\n    );\n  }\n}\n\nexport default ChildComponent;<\/code><\/pre>\n<p>*   \u00dcst bile\u015fen (<code>ParentComponent<\/code>), <code>ChildComponent<\/code>&#8216;e <code>name<\/code> ve <code>age<\/code> ad\u0131nda iki \u00f6zellik (prop) iletiyor.<br \/>\n*   Alt bile\u015fen (<code>ChildComponent<\/code>) i\u00e7inde, bu \u00f6zelliklere <code>this.props.name<\/code> ve <code>this.props.age<\/code> \u015feklinde eri\u015filir.<br \/>\n*   Props&#8217;lar de\u011fi\u015ftirilemez; <code>this.props.name = \"Yeni \u0130sim\";<\/code> gibi bir atama hata verir veya istenmeyen davran\u0131\u015flara yol a\u00e7ar.<\/p>\n<h4><code>defaultProps<\/code> ve <code>propTypes<\/code><\/h4>\n<p>*   <strong><code>defaultProps<\/code><\/strong>: Bir bile\u015fenin belirli \u00f6zellikler i\u00e7in varsay\u0131lan de\u011ferlere sahip olmas\u0131n\u0131 sa\u011flar. E\u011fer \u00fcst bile\u015fen ilgili \u00f6zelli\u011fi sa\u011flamazsa, varsay\u0131lan de\u011fer kullan\u0131l\u0131r.<\/p>\n<pre><code class=\"language-jsx\">class ChildComponent extends Component {\n      \/\/ ...\n    }\n\n    ChildComponent.defaultProps = {\n      name: \"Misafir\",\n      age: 0\n    };<\/code><\/pre>\n<p>*   <strong><code>propTypes<\/code><\/strong>: Geli\u015ftirme a\u015famas\u0131nda \u00f6zelliklerin beklenen veri tiplerini do\u011frulamak i\u00e7in kullan\u0131l\u0131r. React&#8217;in kendi <code>prop-types<\/code> k\u00fct\u00fcphanesi ile birlikte kullan\u0131l\u0131r. \u00dcretim ortam\u0131nda performans amac\u0131yla kald\u0131r\u0131l\u0131r.<\/p>\n<pre><code class=\"language-jsx\">import PropTypes from 'prop-types';\n\n    class ChildComponent extends Component {\n      \/\/ ...\n    }\n\n    ChildComponent.propTypes = {\n      name: PropTypes.string.isRequired,\n      age: PropTypes.number\n    };<\/code><\/pre>\n<p>    Bu, <code>name<\/code> prop&#8217;unun bir string olmas\u0131n\u0131 ve zorunlu olmas\u0131n\u0131, <code>age<\/code> prop&#8217;unun ise bir say\u0131 olmas\u0131n\u0131 bekledi\u011fimizi belirtir.<\/p>\n<h3>Ya\u015fam D\u00f6ng\u00fcs\u00fc Metotlar\u0131<\/h3>\n<p>React s\u0131n\u0131f bile\u015fenleri, ya\u015fam d\u00f6ng\u00fclerinin belirli a\u015famalar\u0131nda \u00e7al\u0131\u015fan \u00f6zel metotlara sahiptir. Bu metotlar, bile\u015fenin olu\u015fturulmas\u0131, g\u00fcncellenmesi ve DOM&#8217;dan kald\u0131r\u0131lmas\u0131 gibi olaylara tepki vermemizi sa\u011flar.<\/p>\n<h4>Birle\u015fme (Mounting) A\u015famas\u0131<\/h4>\n<p>Bile\u015fenin ilk kez DOM&#8217;a eklenmesi s\u00fcrecidir.<\/p>\n<p>1.  <strong><code>constructor(props)<\/code><\/strong>: \u0130lk \u00e7a\u011fr\u0131l\u0131r. Ba\u015flang\u0131\u00e7 durumunu ve metotlar\u0131 ba\u011flamak i\u00e7in kullan\u0131l\u0131r.<br \/>\n2.  <strong><code>static getDerivedStateFromProps(props, state)<\/code><\/strong>: Nadiren kullan\u0131l\u0131r. <code>render<\/code> metodu \u00e7a\u011fr\u0131lmadan hemen \u00f6nce, hem birle\u015fme hem de g\u00fcncelleme a\u015famalar\u0131nda \u00e7a\u011fr\u0131l\u0131r. Props&#8217;taki de\u011fi\u015fikliklere g\u00f6re state&#8217;i g\u00fcncellemek i\u00e7in kullan\u0131l\u0131r. Bir nesne d\u00f6nd\u00fcrmelidir (state&#8217;i g\u00fcncellemek i\u00e7in) veya <code>null<\/code> d\u00f6nd\u00fcrmelidir (state&#8217;i de\u011fi\u015ftirmemek i\u00e7in).<br \/>\n3.  <strong><code>render()<\/code><\/strong>: JSX d\u00f6nd\u00fcr\u00fcr. Bile\u015fenin g\u00f6r\u00fcn\u00fcm\u00fcn\u00fc olu\u015fturur.<br \/>\n4.  <strong><code>componentDidMount()<\/code><\/strong>: Bile\u015fen DOM&#8217;a eklendikten ve render edildikten hemen sonra \u00e7a\u011fr\u0131l\u0131r. A\u011f istekleri (API \u00e7a\u011fr\u0131lar\u0131), DOM manip\u00fclasyonlar\u0131, abonelikler (subscriptions) veya zamanlay\u0131c\u0131lar (timers) gibi yan etkileri (side effects) burada ba\u015flatmak i\u00e7in idealdir.<\/p>\n<pre><code class=\"language-jsx\">class DataFetcher extends Component {\n      constructor(props) {\n        super(props);\n        this.state = { data: null, loading: true };\n      }\n\n      componentDidMount() {\n        console.log('Bile\u015fen DOM\\'a eklendi.');\n        \/\/ Veri \u00e7ekme i\u015flemi\n        fetch('https:\/\/api.example.com\/data')\n          .then(response => response.json())\n          .then(data => this.setState({ data, loading: false }))\n          .catch(error => console.error('Veri \u00e7ekme hatas\u0131:', error));\n      }\n\n      render() {\n        if (this.state.loading) {\n          return <p>Veriler y\u00fckleniyor...<\/p>;\n        }\n        return <div>Veri: {JSON.stringify(this.state.data)}<\/div>;\n      }\n    }<\/code><\/pre>\n<h4>G\u00fcncelleme (Updating) A\u015famas\u0131<\/h4>\n<p>Bile\u015fenin props veya state&#8217;i de\u011fi\u015fti\u011finde ger\u00e7ekle\u015fir.<\/p>\n<p>1.  <strong><code>static getDerivedStateFromProps(props, state)<\/code><\/strong>: Props veya state de\u011fi\u015fti\u011finde tekrar \u00e7a\u011fr\u0131l\u0131r.<br \/>\n2.  <strong><code>shouldComponentUpdate(nextProps, nextState)<\/code><\/strong>: Performans optimizasyonu i\u00e7in kullan\u0131l\u0131r. Varsay\u0131lan olarak <code>true<\/code> d\u00f6nd\u00fcr\u00fcr. E\u011fer <code>false<\/code> d\u00f6nd\u00fcr\u00fcrseniz, bile\u015fenin yeniden render edilmesini ve alt bile\u015fenlerinin g\u00fcncellenmesini engeller. Genellikle, props veya state&#8217;in ger\u00e7ekten de\u011fi\u015fip de\u011fi\u015fmedi\u011fini kontrol etmek i\u00e7in kullan\u0131l\u0131r.<\/p>\n<pre><code class=\"language-jsx\">shouldComponentUpdate(nextProps, nextState) {\n      \/\/ Sadece 'count' prop'u de\u011fi\u015firse yeniden render et.\n      if (nextProps.count !== this.props.count) {\n        return true;\n      }\n      return false;\n    }<\/code><\/pre>\n<p>3.  <strong><code>render()<\/code><\/strong>: E\u011fer <code>shouldComponentUpdate<\/code> <code>true<\/code> d\u00f6nerse, bile\u015fen yeniden render edilir.<br \/>\n4.  <strong><code>getSnapshotBeforeUpdate(prevProps, prevState)<\/code><\/strong>: Nadiren kullan\u0131l\u0131r. <code>render<\/code> metodu \u00e7a\u011fr\u0131ld\u0131ktan hemen sonra, ancak DOM&#8217;a de\u011fi\u015fiklikler yans\u0131t\u0131lmadan \u00f6nce \u00e7a\u011fr\u0131l\u0131r. DOM&#8217;un g\u00fcncellenmeden \u00f6nceki durumunu yakalamak i\u00e7in kullan\u0131l\u0131r (\u00f6rne\u011fin, bir kayd\u0131rma pozisyonunu kaydetmek). Bu metodun d\u00f6nd\u00fcrd\u00fc\u011f\u00fc de\u011fer, <code>componentDidUpdate<\/code> metoduna \u00fc\u00e7\u00fcnc\u00fc arg\u00fcman olarak iletilir.<br \/>\n5.  <strong><code>componentDidUpdate(prevProps, prevState, snapshot)<\/code><\/strong>: Bile\u015fen g\u00fcncellendikten ve DOM&#8217;a yans\u0131t\u0131ld\u0131ktan hemen sonra \u00e7a\u011fr\u0131l\u0131r. G\u00fcncellenen DOM ile etkile\u015fime girmek, a\u011f istekleri yapmak (props&#8217;lar de\u011fi\u015fti\u011finde) veya \u00f6nceki props\/state ile mevcut props\/state&#8217;i kar\u015f\u0131la\u015ft\u0131rmak i\u00e7in kullan\u0131l\u0131r.<\/p>\n<pre><code class=\"language-jsx\">componentDidUpdate(prevProps, prevState) {\n      if (this.props.userId !== prevProps.userId) {\n        console.log('Kullan\u0131c\u0131 ID de\u011fi\u015fti, yeni veri \u00e7ekiliyor...');\n        \/\/ Yeni kullan\u0131c\u0131 verilerini \u00e7ekme\n        \/\/ fetchUser(this.props.userId);\n      }\n    }<\/code><\/pre>\n<h4>Ayr\u0131lma (Unmounting) A\u015famas\u0131<\/h4>\n<p>Bile\u015fenin DOM&#8217;dan kald\u0131r\u0131lmas\u0131 s\u00fcrecidir.<\/p>\n<p>1.  <strong><code>componentWillUnmount()<\/code><\/strong>: Bile\u015fen DOM&#8217;dan kald\u0131r\u0131lmadan hemen \u00f6nce \u00e7a\u011fr\u0131l\u0131r. Bu metot, <code>componentDidMount<\/code> veya <code>componentDidUpdate<\/code> i\u00e7inde ba\u015flat\u0131lan abonelikleri iptal etmek, zamanlay\u0131c\u0131lar\u0131 temizlemek veya DOM \u00fczerinde yap\u0131lan manuel de\u011fi\u015fiklikleri geri almak gibi temizlik i\u015flemleri i\u00e7in kullan\u0131l\u0131r. Bellek s\u0131z\u0131nt\u0131lar\u0131n\u0131 \u00f6nlemek i\u00e7in kritik \u00f6neme sahiptir.<\/p>\n<pre><code class=\"language-jsx\">class Timer extends Component {\n      constructor(props) {\n        super(props);\n        this.state = { seconds: 0 };\n        this.timer = null;\n      }\n\n      componentDidMount() {\n        this.timer = setInterval(() => {\n          this.setState(prevState => ({\n            seconds: prevState.seconds + 1\n          }));\n        }, 1000);\n      }\n\n      componentWillUnmount() {\n        console.log('Bile\u015fen kald\u0131r\u0131l\u0131yor, zamanlay\u0131c\u0131 temizleniyor.');\n        clearInterval(this.timer); \/\/ Bellek s\u0131z\u0131nt\u0131s\u0131n\u0131 \u00f6nle\n      }\n\n      render() {\n        return <p>Ge\u00e7en s\u00fcre: {this.state.seconds} saniye<\/p>;\n      }\n    }<\/code><\/pre>\n<h4>Hata Y\u00f6netimi (Error Handling)<\/h4>\n<p>React 16 ile birlikte tan\u0131t\u0131lan hata s\u0131n\u0131rlar\u0131 (error boundaries), alt bile\u015fen a\u011fac\u0131ndaki JavaScript hatalar\u0131n\u0131 yakalamak, loglamak ve kullan\u0131c\u0131ya yedek bir UI g\u00f6stermek i\u00e7in kullan\u0131l\u0131r.<\/p>\n<p>1.  <strong><code>static getDerivedStateFromError(error)<\/code><\/strong>: Bir alt bile\u015fende hata olu\u015ftu\u011funda \u00e7a\u011fr\u0131l\u0131r. Hata durumunu g\u00fcncellemek i\u00e7in bir nesne d\u00f6nd\u00fcrmelidir.<br \/>\n2.  <strong><code>componentDidCatch(error, errorInfo)<\/code><\/strong>: Bir alt bile\u015fende hata olu\u015ftu\u011funda \u00e7a\u011fr\u0131l\u0131r. Hata bilgilerini bir loglama hizmetine g\u00f6ndermek gibi yan etkiler i\u00e7in kullan\u0131l\u0131r.<\/p>\n<pre><code class=\"language-jsx\">class ErrorBoundary extends Component {\n      constructor(props) {\n        super(props);\n        this.state = { hasError: false };\n      }\n\n      static getDerivedStateFromError(error) {\n        \/\/ Bir sonraki render'da yedek UI g\u00f6sterebilmek i\u00e7in state'i g\u00fcncelleyin.\n        return { hasError: true };\n      }\n\n      componentDidCatch(error, errorInfo) {\n        \/\/ Hata raporlama hizmetine hata bilgisini loglayabilirsiniz.\n        console.error(\"ErrorBoundary yakalad\u0131:\", error, errorInfo);\n      }\n\n      render() {\n        if (this.state.hasError) {\n          \/\/ Yedek UI'y\u0131 render edebilirsiniz.\n          return ;\n        }\n\n        return this.props.children; \/\/ Normalde \u00e7ocuklar\u0131 render et.\n      }\n    }<\/code><\/pre>\n<h3>Olay Y\u00f6netimi (Event Handling)<\/h3>\n<p>React&#8217;te olaylar, DOM olaylar\u0131na benzer \u015fekilde i\u015flenir ancak baz\u0131 farkl\u0131l\u0131klar vard\u0131r. React, taray\u0131c\u0131lar aras\u0131 uyumlulu\u011fu sa\u011flamak i\u00e7in &#8220;sentetik olaylar&#8221; (synthetic events) kullan\u0131r.<\/p>\n<pre><code class=\"language-jsx\">import React, { Component } from 'react';\n\nclass EventExample extends Component {\n  constructor(props) {\n    super(props);\n    this.state = { message: \"Merhaba!\" };\n    \/\/ Metodu ba\u011flama (binding)\n    this.handleClick = this.handleClick.bind(this);\n  }\n\n  handleClick() {\n    this.setState({ message: \"Butona t\u0131kland\u0131!\" });\n    console.log(this); \/\/ 'this' art\u0131k bile\u015feni i\u015faret eder\n  }\n\n  handleInputChange = (event) => { \/\/ S\u0131n\u0131f \u00f6zelli\u011fi (arrow function) ile binding\n    this.setState({ message: event.target.value });\n  };\n\n  render() {\n    return (\n      <div>\n        <p>{this.state.message}<\/p>\n        {\/<em> Y\u00f6ntem 1: Constructor'da binding <\/em>\/}\n        <button onClick={this.handleClick}>T\u0131kla (Constructor Binding)<\/button>\n\n        {\/<em> Y\u00f6ntem 2: Render i\u00e7inde arrow function - performans maliyeti olabilir <\/em>\/}\n        <button onClick={() => this.setState({ message: \"\u0130kinci buton t\u0131kland\u0131!\" })}>\n          T\u0131kla (Inline Arrow)\n        <\/button>\n\n        {\/<em> Y\u00f6ntem 3: S\u0131n\u0131f \u00f6zelli\u011fi (arrow function) ile binding - en yayg\u0131n ve \u00f6nerilen <\/em>\/}\n        <input type=\"text\" onChange={this.handleInputChange} value={this.state.message} \/>\n      <\/div>\n    );\n  }\n}\n\nexport default EventExample;<\/code><\/pre>\n<p>*   <strong><code>this<\/code> ba\u011flama (binding)<\/strong>: JavaScript&#8217;te s\u0131n\u0131f metotlar\u0131 varsay\u0131lan olarak <code>this<\/code> ba\u011flam\u0131n\u0131 korumaz. React olay i\u015fleyicilerinde <code>this<\/code>&#8216;in bile\u015feni i\u015faret etmesini sa\u011flamak i\u00e7in \u00fc\u00e7 yayg\u0131n y\u00f6ntem vard\u0131r:<br \/>\n    1.  <strong><code>constructor<\/code> i\u00e7inde <code>.bind(this)<\/code> kullanmak<\/strong>: En geleneksel y\u00f6ntemdir. Her \u00f6rnek i\u00e7in bir kez yap\u0131l\u0131r.<br \/>\n    2.  <strong>Render metodu i\u00e7inde ok fonksiyonu (arrow function) kullanmak<\/strong>: <code>onClick={() => this.handleClick()}<\/code>. Her render edildi\u011finde yeni bir fonksiyon olu\u015fturuldu\u011fu i\u00e7in performans maliyeti olabilir, ancak basit durumlar i\u00e7in kabul edilebilir.<br \/>\n    3.  <strong>S\u0131n\u0131f \u00f6zelli\u011fi olarak ok fonksiyonu tan\u0131mlamak<\/strong>: <code>handleClick = () => { ... }<\/code>. Babel eklentisi gerektirse de (CRA gibi ara\u00e7lar bunu varsay\u0131lan olarak destekler), en temiz ve \u00f6nerilen y\u00f6ntemdir.<\/p>\n<p>*   <strong>Sentetik Olaylar<\/strong>: React, taray\u0131c\u0131lar\u0131n yerel olaylar\u0131n\u0131 saran sentetik olay nesneleri kullan\u0131r. Bu nesneler, farkl\u0131 taray\u0131c\u0131larda tutarl\u0131 davran\u0131\u015f sa\u011flar. <code>event.preventDefault()<\/code> veya <code>event.stopPropagation()<\/code> gibi standart DOM olay metotlar\u0131 sentetik olay nesnelerinde de mevcuttur.<\/p>\n<h3>Referanslar (Refs)<\/h3>\n<p>React&#8217;in deklaratif yap\u0131s\u0131 gere\u011fi, genellikle do\u011frudan DOM elemanlar\u0131na veya bile\u015fen \u00f6rneklerine eri\u015fmeye gerek kalmaz. Ancak baz\u0131 \u00f6zel durumlarda bu t\u00fcr bir eri\u015fim gerekli olabilir. Referanslar (refs), bu do\u011frudan eri\u015fimi sa\u011flamak i\u00e7in kullan\u0131l\u0131r.<\/p>\n<p>*   <strong>Ne zaman kullan\u0131l\u0131r?<\/strong><br \/>\n    *   Bir form giri\u015fine odaklanmak (focus) veya metin se\u00e7mek.<br \/>\n    *   Medya oynatmay\u0131 y\u00f6netmek (oynat, duraklat).<br \/>\n    *   Animasyonlar\u0131 tetiklemek.<br \/>\n    *   \u00dc\u00e7\u00fcnc\u00fc taraf DOM k\u00fct\u00fcphaneleriyle entegrasyon.<br \/>\n*   <strong>Ne zaman kullan\u0131lmamal\u0131d\u0131r?<\/strong><br \/>\n    *   Props veya state ile y\u00f6netilebilecek her durumda.<br \/>\n    *   Deklaratif React ak\u0131\u015f\u0131n\u0131 bozmaktan ka\u00e7\u0131n\u0131n.<\/p>\n<pre><code class=\"language-jsx\">import React, { Component } from 'react';\n\nclass RefExample extends Component {\n  constructor(props) {\n    super(props);\n    this.myInputRef = React.createRef(); \/\/ Ref olu\u015fturma\n  }\n\n  componentDidMount() {\n    \/\/ Bile\u015fen DOM'a eklendikten sonra input'a odaklan\n    this.myInputRef.current.focus();\n  }\n\n  handleClick = () => {\n    alert(<code>Input de\u011feri: ${this.myInputRef.current.value}<\/code>);\n  };\n\n  render() {\n    return (\n      <div>\n        <input type=\"text\" ref={this.myInputRef} \/> {\/<em> Ref'i elemana ba\u011flama <\/em>\/}\n        <button onClick={this.handleClick}>De\u011feri G\u00f6ster<\/button>\n      <\/div>\n    );\n    \/\/ this.myInputRef.current, render edildikten sonra <input> DOM eleman\u0131n\u0131 i\u015faret eder.\n  }\n}\n\nexport default RefExample;<\/code><\/pre>\n<p>*   <code>React.createRef()<\/code>: Yap\u0131land\u0131r\u0131c\u0131da bir ref olu\u015ftururuz.<br \/>\n*   <code>ref={this.myInputRef}<\/code>: Olu\u015fturulan ref&#8217;i JSX eleman\u0131na ba\u011flar\u0131z.<br \/>\n*   <code>this.myInputRef.current<\/code>: Bile\u015fen DOM&#8217;a eklendikten sonra, ba\u011fl\u0131 oldu\u011fu DOM eleman\u0131na veya bile\u015fen \u00f6rne\u011fine <code>.current<\/code> \u00f6zelli\u011fi \u00fczerinden eri\u015filir.<\/p>\n<h3>Context API ile Kullan\u0131m<\/h3>\n<p>Context API, prop drilling (\u00f6zellikleri bir\u00e7ok alt bile\u015fenden ge\u00e7irme) sorununu \u00e7\u00f6zmek i\u00e7in React 16.3 ile tan\u0131t\u0131ld\u0131. S\u0131n\u0131f bile\u015fenlerinde Context&#8217;i kullanman\u0131n iki ana yolu vard\u0131r:<\/p>\n<p>1.  <strong><code>Context.Consumer<\/code> bile\u015feni<\/strong>: JSX i\u00e7inde bir render prop deseni kullanarak Context de\u011ferine eri\u015fim sa\u011flar.<\/p>\n<pre><code class=\"language-jsx\">\/\/ MyContext.js\n    import React from 'react';\n    export const ThemeContext = React.createContext('light'); \/\/ Varsay\u0131lan de\u011fer\n\n    \/\/ App.js\n    import React, { Component } from 'react';\n    import { ThemeContext } from '.\/MyContext';\n    import ThemedButton from '.\/ThemedButton';\n\n    class App extends Component {\n      render() {\n        return (\n          <ThemeContext.Provider value=\"dark\">\n            <ThemedButton \/>\n          <\/ThemeContext.Provider>\n        );\n      }\n    }\n\n    \/\/ ThemedButton.js\n    import React, { Component } from 'react';\n    import { ThemeContext } from '.\/MyContext';\n\n    class ThemedButton extends Component {\n      render() {\n        return (\n          <ThemeContext.Consumer>\n            {theme => (\n              <button style={{ background: theme === 'dark' ? 'black' : 'white', color: theme === 'dark' ? 'white' : 'black' }}>\n                {theme} Tema\n              <\/button>\n            )}\n          <\/ThemeContext.Consumer>\n        );\n      }\n    }<\/code><\/pre>\n<p>2.  <strong><code>static contextType<\/code><\/strong>: Sadece tek bir Context&#8217;e eri\u015fmek isteyen s\u0131n\u0131f bile\u015fenleri i\u00e7in daha basit bir y\u00f6ntemdir.<\/p>\n<pre><code class=\"language-jsx\">\/\/ ThemedButton.js (static contextType ile)\n    import React, { Component } from 'react';\n    import { ThemeContext } from '.\/MyContext';\n\n    class ThemedButton extends Component {\n      static contextType = ThemeContext; \/\/ Sadece tek bir context ba\u011flanabilir.\n\n      render() {\n        const theme = this.context; \/\/ this.context \u00fczerinden eri\u015fim\n        return (\n          <button style={{ background: theme === 'dark' ? 'black' : 'white', color: theme === 'dark' ? 'white' : 'black' }}>\n            {theme} Tema (contextType)\n          <\/button>\n        );\n      }\n    }<\/code><\/pre>\n<h3>S\u0131n\u0131f Bile\u015fenlerinin Avantajlar\u0131 ve Dezavantajlar\u0131<\/h3>\n<p>React&#8217;in evrimiyle birlikte, s\u0131n\u0131f bile\u015fenlerinin baz\u0131 avantajlar\u0131 ve dezavantajlar\u0131 daha belirgin hale gelmi\u015ftir.<\/p>\n<h4>Avantajlar<\/h4>\n<p>*   <strong>Durum ve Ya\u015fam D\u00f6ng\u00fcs\u00fc Y\u00f6netimi<\/strong>: <code>this.state<\/code> ve ya\u015fam d\u00f6ng\u00fcs\u00fc metotlar\u0131 (<code>componentDidMount<\/code>, <code>componentDidUpdate<\/code>, <code>componentWillUnmount<\/code>) sayesinde bile\u015fenin t\u00fcm ya\u015fam d\u00f6ng\u00fcs\u00fc \u00fczerinde tam kontrol sa\u011flar.<br \/>\n*   <strong>Hata S\u0131n\u0131rlar\u0131 (Error Boundaries)<\/strong>: Sadece s\u0131n\u0131f bile\u015fenleri <code>componentDidCatch<\/code> ve <code>static getDerivedStateFromError<\/code> metotlar\u0131 ile hata s\u0131n\u0131rlar\u0131 olu\u015fturabilir, bu da uygulaman\u0131n geri kalan\u0131n\u0131 \u00e7\u00f6kmeden korumak i\u00e7in hayati \u00f6neme sahiptir.<br \/>\n*   <strong>Eski Kod Tabanlar\u0131<\/strong>: Mevcut bir\u00e7ok b\u00fcy\u00fck \u00f6l\u00e7ekli React uygulamas\u0131 hala s\u0131n\u0131f bile\u015fenleri kullanmaktad\u0131r. Bu kod tabanlar\u0131n\u0131 anlamak ve s\u00fcrd\u00fcrmek i\u00e7in s\u0131n\u0131f bile\u015feni bilgisi gereklidir.<\/p>\n<h4>Dezavantajlar<\/h4>\n<p>*   <strong>Boilerplate Kodu<\/strong>: Durum y\u00f6netimi, metot ba\u011flama ve ya\u015fam d\u00f6ng\u00fcs\u00fc metotlar\u0131 nedeniyle fonksiyonel bile\u015fenlere g\u00f6re daha fazla standart kod (boilerplate) gerektirir.<br \/>\n*   <strong><code>this<\/code> Ba\u011flam\u0131n\u0131n Karma\u015f\u0131kl\u0131\u011f\u0131<\/strong>: JavaScript&#8217;teki <code>this<\/code> anahtar kelimesinin davran\u0131\u015f\u0131, \u00f6zellikle olay i\u015fleyicilerinde, yeni ba\u015flayanlar i\u00e7in kafa kar\u0131\u015ft\u0131r\u0131c\u0131 olabilir ve manuel ba\u011flama gerektirir.<br \/>\n*   <strong>Mant\u0131k Tekrar\u0131 ve Payla\u015f\u0131m\u0131 Zorlu\u011fu<\/strong>: Bile\u015fenler aras\u0131nda durum bilgisi olmayan mant\u0131\u011f\u0131 (stateless logic) veya durum bilgisi olan mant\u0131\u011f\u0131 (stateful logic) payla\u015fmak, Y\u00fcksek Dereceli Bile\u015fenler (Higher-Order Components &#8211; HOCs) veya Render Props gibi daha karma\u015f\u0131k desenler gerektirir.<br \/>\n*   <strong>Okunabilirlik ve Test Edilebilirlik<\/strong>: Ya\u015fam d\u00f6ng\u00fcs\u00fc metotlar\u0131, ilgili mant\u0131\u011f\u0131 farkl\u0131 yerlere da\u011f\u0131tabilir (\u00f6rne\u011fin, bir veri \u00e7ekme i\u015flemi <code>componentDidMount<\/code> ve <code>componentDidUpdate<\/code> i\u00e7inde olabilir), bu da kodun okunabilirli\u011fini ve test edilebilirli\u011fini zorla\u015ft\u0131rabilir.<br \/>\n*   <strong>Hooks&#8217;un G\u00f6lgesinde Kalmas\u0131<\/strong>: React Hooks&#8217;un tan\u0131t\u0131lmas\u0131yla (<code>useState<\/code>, <code>useEffect<\/code> vb.), fonksiyonel bile\u015fenler art\u0131k durum ve ya\u015fam d\u00f6ng\u00fcs\u00fc yeteneklerine sahip oldu. Bu, fonksiyonel bile\u015fenleri daha \u00f6zl\u00fc, okunabilir ve yeniden kullan\u0131labilir hale getirdi.<\/p>\n<h3>S\u0131n\u0131f Bile\u015fenlerinden Fonksiyonel Bile\u015fenlere Ge\u00e7i\u015f<\/h3>\n<p>React Hooks&#8217;un 2018&#8217;de tan\u0131t\u0131lmas\u0131yla, fonksiyonel bile\u015fenler art\u0131k s\u0131n\u0131f bile\u015fenlerinin t\u00fcm yeteneklerine (hatta daha fazlas\u0131na) sahip olmu\u015ftur. Yeni projelerde genellikle fonksiyonel bile\u015fenler ve Hooks tercih edilir.<\/p>\n<p>*   <code>this.state<\/code> yerine <code>useState<\/code>.<br \/>\n*   <code>componentDidMount<\/code>, <code>componentDidUpdate<\/code>, <code>componentWillUnmount<\/code> ya\u015fam d\u00f6ng\u00fcs\u00fc metotlar\u0131n\u0131n e\u015fde\u011feri olarak <code>useEffect<\/code>.<br \/>\n*   <code>this.context<\/code> veya <code>Context.Consumer<\/code> yerine <code>useContext<\/code>.<br \/>\n*   <code>React.createRef()<\/code> yerine <code>useRef<\/code>.<\/p>\n<p>Bu ge\u00e7i\u015f, kodun daha az karma\u015f\u0131k, daha mod\u00fcler ve daha kolay test edilebilir olmas\u0131n\u0131 sa\u011flar. Ancak, s\u0131n\u0131f bile\u015fenlerinin temelini anlamak, React ekosistemini ve eski projeleri anlamak i\u00e7in hala vazge\u00e7ilmezdir.<\/p>\n<h3>Sonu\u00e7<\/h3>\n<p>React s\u0131n\u0131f bile\u015fenleri, k\u00fct\u00fcphanenin tarihsel geli\u015fiminde ve modern uygulamalar\u0131n temelinde \u00f6nemli bir yere sahiptir. Durum y\u00f6netimi, ya\u015fam d\u00f6ng\u00fcs\u00fc metotlar\u0131 ve hata s\u0131n\u0131rlar\u0131 gibi g\u00fc\u00e7l\u00fc \u00f6zellikleriyle, karma\u015f\u0131k UI&#8217;lar olu\u015fturmak i\u00e7in y\u0131llarca tercih edilen y\u00f6ntem olmu\u015ftur. Her ne kadar React Hooks&#8217;un getirdi\u011fi yeniliklerle fonksiyonel bile\u015fenler daha pop\u00fcler hale gelmi\u015f olsa da, s\u0131n\u0131f bile\u015fenlerinin prensiplerini ve \u00e7al\u0131\u015fma \u015fekillerini kavramak, bir React geli\u015ftiricisi i\u00e7in hala temel bir beceridir.<\/p>\n<p>Eski kod tabanlar\u0131n\u0131 s\u00fcrd\u00fcrmek, hata s\u0131n\u0131rlar\u0131 olu\u015fturmak veya React&#8217;in dahili i\u015fleyi\u015fini daha iyi anlamak i\u00e7in s\u0131n\u0131f bile\u015fenleri bilgisi kritik \u00f6neme sahiptir. Yeni projelerde genellikle fonksiyonel bile\u015fenler tercih edilse de, s\u0131n\u0131f bile\u015fenleri React&#8217;in g\u00fc\u00e7l\u00fc ve esnek yap\u0131s\u0131n\u0131n bir kan\u0131t\u0131 olarak varl\u0131\u011f\u0131n\u0131 s\u00fcrd\u00fcrmektedir. Bu makale, s\u0131n\u0131f bile\u015fenlerinin kapsaml\u0131 bir genel bak\u0131\u015f\u0131n\u0131 sunarak, React d\u00fcnyas\u0131ndaki yerlerini ve \u00f6nemlerini vurgulamay\u0131 ama\u00e7lam\u0131\u015ft\u0131r.<\/body><\/p>\n","protected":false},"excerpt":{"rendered":"React&#8217;te S\u0131n\u0131f Bile\u015fenlerine Genel Bak\u0131\u015f\nReact, modern web uygulamalar\u0131 geli\u015ftirmek i\u00e7in kullan\u0131lan g\u00fc\u00e7l\u00fc bir JavaScript k\u00fct\u00fcphanesidir","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-37421","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 S\u0131n\u0131f Bile\u015fenlerine Genel Bak\u0131\u015f - 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-sinif-bilesenlerine-genel-bakis\/\" \/>\n<meta property=\"og:locale\" content=\"tr_TR\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"React&#039;te S\u0131n\u0131f Bile\u015fenlerine Genel Bak\u0131\u015f\" \/>\n<meta property=\"og:description\" content=\"React&#039;te S\u0131n\u0131f Bile\u015fenlerine Genel Bak\u0131\u015f React, modern web uygulamalar\u0131 geli\u015ftirmek i\u00e7in kullan\u0131lan g\u00fc\u00e7l\u00fc bir JavaScript k\u00fct\u00fcphanesidir\" \/>\n<meta property=\"og:url\" content=\"https:\/\/fatihsoysal.com\/blog\/reactte-sinif-bilesenlerine-genel-bakis\/\" \/>\n<meta property=\"og:site_name\" content=\"Kodlar\u0131n Gizemli D\u00fcnyas\u0131\" \/>\n<meta property=\"article:published_time\" content=\"2026-01-04T00:40:46+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=\"17 dakika\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/fatihsoysal.com\/blog\/reactte-sinif-bilesenlerine-genel-bakis\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/fatihsoysal.com\/blog\/reactte-sinif-bilesenlerine-genel-bakis\/\"},\"author\":{\"name\":\"Fatih Soysal\",\"@id\":\"https:\/\/fatihsoysal.com\/blog\/#\/schema\/person\/002a254750921dcfd568a99e48240dd1\"},\"headline\":\"React&#8217;te S\u0131n\u0131f Bile\u015fenlerine Genel Bak\u0131\u015f\",\"datePublished\":\"2026-01-04T00:40:46+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/fatihsoysal.com\/blog\/reactte-sinif-bilesenlerine-genel-bakis\/\"},\"wordCount\":2469,\"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-sinif-bilesenlerine-genel-bakis\/#respond\"]}],\"copyrightYear\":\"2026\",\"copyrightHolder\":{\"@id\":\"https:\/\/fatihsoysal.com\/blog\/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/fatihsoysal.com\/blog\/reactte-sinif-bilesenlerine-genel-bakis\/\",\"url\":\"https:\/\/fatihsoysal.com\/blog\/reactte-sinif-bilesenlerine-genel-bakis\/\",\"name\":\"React'te S\u0131n\u0131f Bile\u015fenlerine Genel Bak\u0131\u015f - Kodlar\u0131n Gizemli D\u00fcnyas\u0131\",\"isPartOf\":{\"@id\":\"https:\/\/fatihsoysal.com\/blog\/#website\"},\"datePublished\":\"2026-01-04T00:40:46+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/fatihsoysal.com\/blog\/reactte-sinif-bilesenlerine-genel-bakis\/#breadcrumb\"},\"inLanguage\":\"tr\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/fatihsoysal.com\/blog\/reactte-sinif-bilesenlerine-genel-bakis\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/fatihsoysal.com\/blog\/reactte-sinif-bilesenlerine-genel-bakis\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Anasayfa\",\"item\":\"https:\/\/fatihsoysal.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"React&#8217;te S\u0131n\u0131f Bile\u015fenlerine Genel Bak\u0131\u015f\"}]},{\"@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 S\u0131n\u0131f Bile\u015fenlerine Genel Bak\u0131\u015f - 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-sinif-bilesenlerine-genel-bakis\/","og_locale":"tr_TR","og_type":"article","og_title":"React'te S\u0131n\u0131f Bile\u015fenlerine Genel Bak\u0131\u015f","og_description":"React'te S\u0131n\u0131f Bile\u015fenlerine Genel Bak\u0131\u015f React, modern web uygulamalar\u0131 geli\u015ftirmek i\u00e7in kullan\u0131lan g\u00fc\u00e7l\u00fc bir JavaScript k\u00fct\u00fcphanesidir","og_url":"https:\/\/fatihsoysal.com\/blog\/reactte-sinif-bilesenlerine-genel-bakis\/","og_site_name":"Kodlar\u0131n Gizemli D\u00fcnyas\u0131","article_published_time":"2026-01-04T00:40:46+00:00","author":"Fatih Soysal","twitter_card":"summary_large_image","twitter_misc":{"Yazan:":"Fatih Soysal","Tahmini okuma s\u00fcresi":"17 dakika"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/fatihsoysal.com\/blog\/reactte-sinif-bilesenlerine-genel-bakis\/#article","isPartOf":{"@id":"https:\/\/fatihsoysal.com\/blog\/reactte-sinif-bilesenlerine-genel-bakis\/"},"author":{"name":"Fatih Soysal","@id":"https:\/\/fatihsoysal.com\/blog\/#\/schema\/person\/002a254750921dcfd568a99e48240dd1"},"headline":"React&#8217;te S\u0131n\u0131f Bile\u015fenlerine Genel Bak\u0131\u015f","datePublished":"2026-01-04T00:40:46+00:00","mainEntityOfPage":{"@id":"https:\/\/fatihsoysal.com\/blog\/reactte-sinif-bilesenlerine-genel-bakis\/"},"wordCount":2469,"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-sinif-bilesenlerine-genel-bakis\/#respond"]}],"copyrightYear":"2026","copyrightHolder":{"@id":"https:\/\/fatihsoysal.com\/blog\/#organization"}},{"@type":"WebPage","@id":"https:\/\/fatihsoysal.com\/blog\/reactte-sinif-bilesenlerine-genel-bakis\/","url":"https:\/\/fatihsoysal.com\/blog\/reactte-sinif-bilesenlerine-genel-bakis\/","name":"React'te S\u0131n\u0131f Bile\u015fenlerine Genel Bak\u0131\u015f - Kodlar\u0131n Gizemli D\u00fcnyas\u0131","isPartOf":{"@id":"https:\/\/fatihsoysal.com\/blog\/#website"},"datePublished":"2026-01-04T00:40:46+00:00","breadcrumb":{"@id":"https:\/\/fatihsoysal.com\/blog\/reactte-sinif-bilesenlerine-genel-bakis\/#breadcrumb"},"inLanguage":"tr","potentialAction":[{"@type":"ReadAction","target":["https:\/\/fatihsoysal.com\/blog\/reactte-sinif-bilesenlerine-genel-bakis\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/fatihsoysal.com\/blog\/reactte-sinif-bilesenlerine-genel-bakis\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Anasayfa","item":"https:\/\/fatihsoysal.com\/blog\/"},{"@type":"ListItem","position":2,"name":"React&#8217;te S\u0131n\u0131f Bile\u015fenlerine Genel Bak\u0131\u015f"}]},{"@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\/37421","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=37421"}],"version-history":[{"count":1,"href":"https:\/\/fatihsoysal.com\/blog\/wp-json\/wp\/v2\/posts\/37421\/revisions"}],"predecessor-version":[{"id":37422,"href":"https:\/\/fatihsoysal.com\/blog\/wp-json\/wp\/v2\/posts\/37421\/revisions\/37422"}],"wp:attachment":[{"href":"https:\/\/fatihsoysal.com\/blog\/wp-json\/wp\/v2\/media?parent=37421"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fatihsoysal.com\/blog\/wp-json\/wp\/v2\/categories?post=37421"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fatihsoysal.com\/blog\/wp-json\/wp\/v2\/tags?post=37421"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}