Skip to content

Commit ead384b

Browse files
committed
wip
1 parent d7bd592 commit ead384b

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

src/content/reference/react-dom/preload.md

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -5,19 +5,19 @@ canary: true
55

66
<Canary>
77

8-
The `preload` function is currently only available in React's Canary and experimental channels. Learn more about [React's release channels here](/community/versioning-policy#all-release-channels).
8+
Fungsi `preload` saat ini hanya tersedia di kanal Canary dan eksperimental React. Pelajari lebih lanjut tentang [kanal rilis React di sini](/community/versioning-policy#all-release-channels).
99

1010
</Canary>
1111

1212
<Note>
1313

14-
[React-based frameworks](/learn/start-a-new-react-project) frequently handle resource loading for you, so you might not have to call this API yourself. Consult your framework's documentation for details.
14+
[Framework berbasis React](/learn/start-a-new-react-project) sering kali menangani pemuatan sumber daya untuk Anda, jadi Anda mungkin tidak perlu memanggil API ini sendiri. Lihat dokumentasi framework Anda untuk detailnya.
1515

1616
</Note>
1717

1818
<Intro>
1919

20-
`preload` lets you eagerly fetch a resource such as a stylesheet, font, or external script that you expect to use.
20+
`preload` memungkinkan Anda mengambil sumber daya seperti *stylesheet*, *font*, atau skrip eksternal yang ingin Anda gunakan.
2121

2222
```js
2323
preload("https://example.com/font.woff2", {as: "font"});
@@ -29,11 +29,11 @@ preload("https://example.com/font.woff2", {as: "font"});
2929

3030
---
3131

32-
## Reference {/*reference*/}
32+
## Referensi {/*reference*/}
3333

3434
### `preload(href, options)` {/*preload*/}
3535

36-
To preload a resource, call the `preload` function from `react-dom`.
36+
Untuk memuat sumber daya, panggil fungsi `preload` dari `react-dom`.
3737

3838
```js
3939
import { preload } from 'react-dom';
@@ -45,16 +45,16 @@ function AppRoot() {
4545

4646
```
4747

48-
[See more examples below.](#usage)
48+
[Lihat contoh lainnya di bawah ini.](#usage)
4949

50-
The `preload` function provides the browser with a hint that it should start downloading the given resource, which can save time.
50+
Fungsi `preload` memberikan petunjuk kepada browser untuk mulai mengunduh sumber daya yang diberikan, yang dapat menghemat waktu.
5151

52-
#### Parameters {/*parameters*/}
52+
#### Parameter {/*parameters*/}
5353

54-
* `href`: a string. The URL of the resource you want to download.
55-
* `options`: an object. It contains the following properties:
56-
* `as`: a required string. The type of resource. Its [possible values](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/link#as) are `audio`, `document`, `embed`, `fetch`, `font`, `image`, `object`, `script`, `style`, `track`, `video`, `worker`.
57-
* `crossOrigin`: a string. The [CORS policy](https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/crossorigin) to use. Its possible values are `anonymous` and `use-credentials`. It is required when `as` is set to `"fetch"`.
54+
* `href`: sebuah string. URL sumber daya yang ingin Anda unduh.
55+
* `options`: sebuah objek. Ini berisi properti-properti berikut:
56+
* `as`: string yang diperlukan. Jenis sumber daya. Nilai [yang mungkin] (https://developer.mozilla.org/en-US/docs/Web/HTML/Element/link#as) adalah `audio`, `document`, `embed`, `fetch`, `font`, `image`, `object`, `script`, `style`, `track`, `video`, `worker`.
57+
* `crossOrigin`: sebuah string. [Kebijakan CORS] (https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/crossorigin) yang akan digunakan. Nilai yang mungkin adalah `anonymous` dan `use-credentials`. Ini diperlukan ketika `as` disetel ke `"fetch"`.
5858
* `referrerPolicy`: a string. The [Referrer header](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/link#referrerpolicy) to send when fetching. Its possible values are `no-referrer-when-downgrade` (the default), `no-referrer`, `origin`, `origin-when-cross-origin`, and `unsafe-url`.
5959
* `integrity`: a string. A cryptographic hash of the resource, to [verify its authenticity](https://developer.mozilla.org/en-US/docs/Web/Security/Subresource_Integrity).
6060
* `type`: a string. The MIME type of the resource.

0 commit comments

Comments
 (0)