You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: content/docs/faq-ajax.md
+16-16
Original file line number
Diff line number
Diff line change
@@ -1,31 +1,31 @@
1
1
---
2
2
id: faq-ajax
3
-
title: AJAX and APIs
3
+
title: AJAX i API
4
4
permalink: docs/faq-ajax.html
5
5
layout: docs
6
6
category: FAQ
7
7
---
8
8
9
-
### How can I make an AJAX call? {#how-can-i-make-an-ajax-call}
9
+
### Jak mogę wykonać zapytanie AJAX? {#how-can-i-make-an-ajax-call}
10
10
11
-
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).
11
+
Możesz użyć dowolnej biblioteki AJAX. Do najpopularniejszych wyborów należą:[Axios](https://github.com/axios/axios), [jQuery AJAX](https://api.jquery.com/jQuery.ajax/) oraz wbudowane w przeglądarki[window.fetch](https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API).
12
12
13
-
### Where in the component lifecycle should I make an AJAX call? {#where-in-the-component-lifecycle-should-i-make-an-ajax-call}
13
+
### W którym momencie cyklu życia komponentu powinno się wykonać zapytanie AJAX? {#where-in-the-component-lifecycle-should-i-make-an-ajax-call}
14
14
15
-
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.
15
+
Dane należy uzupełniać z wykorzystaniem zapytań AJAX w metodzie [`componentDidMount`](/docs/react-component.html#mounting). Dzięki temu po pobraniu danych możliwe będzie użycie metody `setState`do zmodyfikowania stanu komponentu.
16
16
17
-
### Example: Using AJAX results to set local state {#example-using-ajax-results-to-set-local-state}
17
+
### Przykład: Używanie rezultatu zapytania AJAX do ustawienia lokalnego stanu {#example-using-ajax-results-to-set-local-state}
18
18
19
-
The component below demonstrates how to make an AJAX call in`componentDidMount`to populate local component state.
19
+
Niniejszy przykład pokazuje, jak wykonując zapytania AJAX w metodzie`componentDidMount`można zmodyfikować stan komponentu.
20
20
21
-
The example API returns a JSON object like this:
21
+
Nasze przykładowe API zwraca następujący obiekt JSON:
0 commit comments