diff --git a/content/docs/faq-ajax.md b/content/docs/faq-ajax.md index 102e1c07e..a526a62c4 100644 --- a/content/docs/faq-ajax.md +++ b/content/docs/faq-ajax.md @@ -1,24 +1,24 @@ --- id: faq-ajax -title: AJAX and APIs +title: AJAX ve APİ'ler permalink: docs/faq-ajax.html layout: docs category: FAQ --- -### How can I make an AJAX call? {#how-can-i-make-an-ajax-call} +### Nasıl AJAX isteği yapabilirim ? {#how-can-i-make-an-ajax-call} -You can use any AJAX library you like with React. Some popular ones are [Axios](https://github.com/axios/axios), [jQuery AJAX](https://api.jquery.com/jQuery.ajax/), and the browser built-in [window.fetch](https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API). +React ile istediğiniz AJAX kütüphanesini kullanabilirsiniz. Bazı popüler kütüphaneler [Axios](https://github.com/axios/axios), [jQuery AJAX](https://api.jquery.com/jQuery.ajax/), ve tarayıcıda yerleşik bulunan [window.fetch](https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API). -### Where in the component lifecycle should I make an AJAX call? {#where-in-the-component-lifecycle-should-i-make-an-ajax-call} +### AJAX isteğini hangi yaşam döngüsü metodunda yapmalıyım ? {#where-in-the-component-lifecycle-should-i-make-an-ajax-call} -You should populate data with AJAX calls in the [`componentDidMount`](/docs/react-component.html#mounting) lifecycle method. This is so you can use `setState` to update your component when the data is retrieved. +Verilerinizi [`componentDidMount`](/docs/react-component.html#mounting) yaşam döngüsü metodu içinde AJAX isteği yaparak doldurabilirsiniz. Veriler alındığında `setState` fonksiyonu ile bileşeninizi güncelleyebilirsiniz. -### Example: Using AJAX results to set local state {#example-using-ajax-results-to-set-local-state} +### Örnek: Yerel bileşen durumlarını ayarlamak için AJAX isteği {#example-using-ajax-results-to-set-local-state} -The component below demonstrates how to make an AJAX call in `componentDidMount` to populate local component state. +Aşağıda bulunan bileşende `componentDidMount` içinde AJAX isteği yaparak yerel bileşen durumunuzu nasıl güncelleyeceğinizi gösterir. -The example API returns a JSON object like this: +API'dan dönen örnek bir JSON verisi: ``` { @@ -50,9 +50,9 @@ class MyComponent extends React.Component { items: result.items }); }, - // Note: it's important to handle errors here - // instead of a catch() block so that we don't swallow - // exceptions from actual bugs in components. + // Not: Burada hataları yakalamak önemlidir. + // Bileşenimizde bug bulunmaması için, 'catch ()' bloğu yerine bulunan + // bu blok içinde hatalar yakalanır. (error) => { this.setState({ isLoaded: true, diff --git a/content/docs/faq-build.md b/content/docs/faq-build.md index b071cc131..5bbd79e1a 100644 --- a/content/docs/faq-build.md +++ b/content/docs/faq-build.md @@ -1,32 +1,32 @@ --- id: faq-build -title: Babel, JSX, and Build Steps +title: Babel, JSX, ve Oluşturma Aşamaları permalink: docs/faq-build.html layout: docs category: FAQ --- -### Do I need to use JSX with React? {#do-i-need-to-use-jsx-with-react} +### React ile JSX kullanmalı mıyım ? {#do-i-need-to-use-jsx-with-react} -No! Check out ["React Without JSX"](/docs/react-without-jsx.html) to learn more. +Hayır! Daha fazlası için ["React Without JSX"](/docs/react-without-jsx.html). -### Do I need to use ES6 (+) with React? {#do-i-need-to-use-es6--with-react} +### React ile ES6 (+) kullanmalı mıyım ? {#do-i-need-to-use-es6--with-react} -No! Check out ["React Without ES6"](/docs/react-without-es6.html) to learn more. +Hayır! Daha fazlası için ["React Without ES6"](/docs/react-without-es6.html). -### How can I write comments in JSX? {#how-can-i-write-comments-in-jsx} +### JSX içinde nasıl yorum satırı kullanabilirim ? {#how-can-i-write-comments-in-jsx} ```jsx
- {/* Comment goes here */} + {/* Yorum satırı buraya gelecek */} Hello, {name}!
``` ```jsx
- {/* It also works - for multi-line comments. */} + {/* Çok satırlı + yorum satırı */} Hello, {name}!
```