Skip to content

Commit dff371c

Browse files
committed
Translate reference headings
1 parent 64bafb3 commit dff371c

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

54 files changed

+350
-350
lines changed

src/content/reference/react-dom/client/createRoot.md

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ const root = createRoot(domNode, options?)
1616
1717
---
1818
19-
## Reference {/*reference*/}
19+
## Viite {/*reference*/}
2020
2121
### `createRoot(domNode, options?)` {/*createroot*/}
2222
@@ -39,7 +39,7 @@ An app fully built with React will usually only have one `createRoot` call for i
3939
4040
[See more examples below.](#usage)
4141
42-
#### Parameters {/*parameters*/}
42+
#### Parametrit {/*parameters*/}
4343
4444
* `domNode`: A [DOM element.](https://developer.mozilla.org/en-US/docs/Web/API/Element) React will create a root for this DOM element and allow you to call functions on the root, such as `render` to display rendered React content.
4545
@@ -48,11 +48,11 @@ An app fully built with React will usually only have one `createRoot` call for i
4848
* **optional** `onRecoverableError`: Callback called when React automatically recovers from errors.
4949
* **optional** `identifierPrefix`: A string prefix React uses for IDs generated by [`useId`.](/reference/react/useId) Useful to avoid conflicts when using multiple roots on the same page.
5050
51-
#### Returns {/*returns*/}
51+
#### Palautukset {/*returns*/}
5252
5353
`createRoot` returns an object with two methods: [`render`](#root-render) and [`unmount`.](#root-unmount)
5454
55-
#### Caveats {/*caveats*/}
55+
#### Rajoitukset {/*caveats*/}
5656
* If your app is server-rendered, using `createRoot()` is not supported. Use [`hydrateRoot()`](/reference/react-dom/client/hydrateRoot) instead.
5757
* You'll likely have only one `createRoot` call in your app. If you use a framework, it might do this call for you.
5858
* When you want to render a piece of JSX in a different part of the DOM tree that isn't a child of your component (for example, a modal or a tooltip), use [`createPortal`](/reference/react-dom/createPortal) instead of `createRoot`.
@@ -71,16 +71,16 @@ React will display `<App />` in the `root`, and take over managing the DOM insid
7171
7272
[See more examples below.](#usage)
7373
74-
#### Parameters {/*root-render-parameters*/}
74+
#### Parametrit {/*root-render-parameters*/}
7575
7676
* `reactNode`: A *React node* that you want to display. This will usually be a piece of JSX like `<App />`, but you can also pass a React element constructed with [`createElement()`](/reference/react/createElement), a string, a number, `null`, or `undefined`.
7777
7878
79-
#### Returns {/*root-render-returns*/}
79+
#### Palautukset {/*root-render-returns*/}
8080
8181
`root.render` returns `undefined`.
8282
83-
#### Caveats {/*root-render-caveats*/}
83+
#### Rajoitukset {/*root-render-caveats*/}
8484
8585
* The first time you call `root.render`, React will clear all the existing HTML content inside the React root before rendering the React component into it.
8686
@@ -105,24 +105,24 @@ This is mostly useful if your React root's DOM node (or any of its ancestors) ma
105105
Calling `root.unmount` will unmount all the components in the root and "detach" React from the root DOM node, including removing any event handlers or state in the tree.
106106
107107
108-
#### Parameters {/*root-unmount-parameters*/}
108+
#### Parametrit {/*root-unmount-parameters*/}
109109
110110
`root.unmount` does not accept any parameters.
111111
112112
113-
#### Returns {/*root-unmount-returns*/}
113+
#### Palautukset {/*root-unmount-returns*/}
114114
115115
`root.unmount` returns `undefined`.
116116
117-
#### Caveats {/*root-unmount-caveats*/}
117+
#### Rajoitukset {/*root-unmount-caveats*/}
118118
119119
* Calling `root.unmount` will unmount all the components in the tree and "detach" React from the root DOM node.
120120
121121
* Once you call `root.unmount` you cannot call `root.render` again on the same root. Attempting to call `root.render` on an unmounted root will throw a "Cannot update an unmounted root" error. However, you can create a new root for the same DOM node after the previous root for that node has been unmounted.
122122
123123
---
124124
125-
## Usage {/*usage*/}
125+
## Käyttö {/*usage*/}
126126
127127
### Rendering an app fully built with React {/*rendering-an-app-fully-built-with-react*/}
128128
@@ -343,7 +343,7 @@ export default function App({counter}) {
343343
It is uncommon to call `render` multiple times. Usually, your components will [update state](/reference/react/useState) instead.
344344
345345
---
346-
## Troubleshooting {/*troubleshooting*/}
346+
## Vianmääritys {/*troubleshooting*/}
347347
348348
### I've created a root, but nothing is displayed {/*ive-created-a-root-but-nothing-is-displayed*/}
349349

src/content/reference/react-dom/client/hydrateRoot.md

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ const root = hydrateRoot(domNode, reactNode, options?)
1616
1717
---
1818
19-
## Reference {/*reference*/}
19+
## Viite {/*reference*/}
2020
2121
### `hydrateRoot(domNode, reactNode, options?)` {/*hydrateroot*/}
2222
@@ -33,7 +33,7 @@ React will attach to the HTML that exists inside the `domNode`, and take over ma
3333
3434
[See more examples below.](#usage)
3535
36-
#### Parameters {/*parameters*/}
36+
#### Parametrit {/*parameters*/}
3737
3838
* `domNode`: A [DOM element](https://developer.mozilla.org/en-US/docs/Web/API/Element) that was rendered as the root element on the server.
3939
@@ -45,11 +45,11 @@ React will attach to the HTML that exists inside the `domNode`, and take over ma
4545
* **optional** `identifierPrefix`: A string prefix React uses for IDs generated by [`useId`.](/reference/react/useId) Useful to avoid conflicts when using multiple roots on the same page. Must be the same prefix as used on the server.
4646
4747
48-
#### Returns {/*returns*/}
48+
#### Palautukset {/*returns*/}
4949
5050
`hydrateRoot` returns an object with two methods: [`render`](#root-render) and [`unmount`.](#root-unmount)
5151
52-
#### Caveats {/*caveats*/}
52+
#### Rajoitukset {/*caveats*/}
5353
5454
* `hydrateRoot()` expects the rendered content to be identical with the server-rendered content. You should treat mismatches as bugs and fix them.
5555
* In development mode, React warns about mismatches during hydration. There are no guarantees that attribute differences will be patched up in case of mismatches. This is important for performance reasons because in most apps, mismatches are rare, and so validating all markup would be prohibitively expensive.
@@ -70,16 +70,16 @@ React will update `<App />` in the hydrated `root`.
7070
7171
[See more examples below.](#usage)
7272
73-
#### Parameters {/*root-render-parameters*/}
73+
#### Parametrit {/*root-render-parameters*/}
7474
7575
* `reactNode`: A "React node" that you want to update. This will usually be a piece of JSX like `<App />`, but you can also pass a React element constructed with [`createElement()`](/reference/react/createElement), a string, a number, `null`, or `undefined`.
7676
7777
78-
#### Returns {/*root-render-returns*/}
78+
#### Palautukset {/*root-render-returns*/}
7979
8080
`root.render` returns `undefined`.
8181
82-
#### Caveats {/*root-render-caveats*/}
82+
#### Rajoitukset {/*root-render-caveats*/}
8383
8484
* If you call `root.render` before the root has finished hydrating, React will clear the existing server-rendered HTML content and switch the entire root to client rendering.
8585
@@ -100,24 +100,24 @@ This is mostly useful if your React root's DOM node (or any of its ancestors) ma
100100
Calling `root.unmount` will unmount all the components in the root and "detach" React from the root DOM node, including removing any event handlers or state in the tree.
101101
102102
103-
#### Parameters {/*root-unmount-parameters*/}
103+
#### Parametrit {/*root-unmount-parameters*/}
104104
105105
`root.unmount` does not accept any parameters.
106106
107107
108-
#### Returns {/*root-unmount-returns*/}
108+
#### Palautukset {/*root-unmount-returns*/}
109109
110110
`root.unmount` returns `undefined`.
111111
112-
#### Caveats {/*root-unmount-caveats*/}
112+
#### Rajoitukset {/*root-unmount-caveats*/}
113113
114114
* Calling `root.unmount` will unmount all the components in the tree and "detach" React from the root DOM node.
115115
116116
* Once you call `root.unmount` you cannot call `root.render` again on the root. Attempting to call `root.render` on an unmounted root will throw a "Cannot update an unmounted root" error.
117117
118118
---
119119
120-
## Usage {/*usage*/}
120+
## Käyttö {/*usage*/}
121121
122122
### Hydrating server-rendered HTML {/*hydrating-server-rendered-html*/}
123123

src/content/reference/react-dom/components/common.md

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ All built-in browser components, such as [`<div>`](https://developer.mozilla.org
1212

1313
---
1414

15-
## Reference {/*reference*/}
15+
## Viite {/*reference*/}
1616

1717
### Common components (e.g. `<div>`) {/*common*/}
1818

@@ -22,7 +22,7 @@ All built-in browser components, such as [`<div>`](https://developer.mozilla.org
2222

2323
[See more examples below.](#usage)
2424

25-
#### Props {/*common-props*/}
25+
#### Propsit {/*common-props*/}
2626

2727
These special React props are supported for all built-in components:
2828

@@ -234,7 +234,7 @@ These events fire for resources like [`<audio>`](https://developer.mozilla.org/e
234234
* [`onWaiting`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/waiting_event): An [`Event` handler](#event-handler) function. Fires when the playback stopped due to temporary lack of data.
235235
* `onWaitingCapture`: A version of `onWaiting` that fires in the [capture phase.](/learn/responding-to-events#capture-phase-events)
236236

237-
#### Caveats {/*common-caveats*/}
237+
#### Rajoitukset {/*common-caveats*/}
238238

239239
- You cannot pass both `children` and `dangerouslySetInnerHTML` at the same time.
240240
- Some events (like `onAbort` and `onLoad`) don't bubble in the browser, but bubble in React.
@@ -255,11 +255,11 @@ When the `<div>` DOM node is added to the screen, React will call your `ref` cal
255255

256256
React will also call your `ref` callback whenever you pass a *different* `ref` callback. In the above example, `(node) => { ... }` is a different function on every render. When your component re-renders, the *previous* function will be called with `null` as the argument, and the *next* function will be called with the DOM node.
257257

258-
#### Parameters {/*ref-callback-parameters*/}
258+
#### Parametrit {/*ref-callback-parameters*/}
259259

260260
* `node`: A DOM node or `null`. React will pass you the DOM node when the ref gets attached, and `null` when the ref gets detached. Unless you pass the same function reference for the `ref` callback on every render, the callback will get temporarily detached and re-attached during every re-render of the component.
261261

262-
#### Returns {/*returns*/}
262+
#### Palautukset {/*returns*/}
263263

264264
Do not return anything from the `ref` callback.
265265

@@ -310,7 +310,7 @@ Additionally, React event objects provide these methods:
310310
* `persist()`: Not used with React DOM. With React Native, call this to read event's properties after the event.
311311
* `isPersistent()`: Not used with React DOM. With React Native, returns whether `persist` has been called.
312312

313-
#### Caveats {/*react-event-object-caveats*/}
313+
#### Rajoitukset {/*react-event-object-caveats*/}
314314

315315
* The values of `currentTarget`, `eventPhase`, `target`, and `type` reflect the values your React code expects. Under the hood, React attaches event handlers at the root, but this is not reflected in React event objects. For example, `e.currentTarget` may not be the same as the underlying `e.nativeEvent.currentTarget`. For polyfilled events, `e.type` (React event type) may differ from `e.nativeEvent.type` (underlying type).
316316

@@ -328,7 +328,7 @@ An event handler type for the [CSS animation](https://developer.mozilla.org/en-U
328328
/>
329329
```
330330

331-
#### Parameters {/*animationevent-handler-parameters*/}
331+
#### Parametrit {/*animationevent-handler-parameters*/}
332332

333333
* `e`: A [React event object](#react-event-object) with these extra [`AnimationEvent`](https://developer.mozilla.org/en-US/docs/Web/API/AnimationEvent) properties:
334334
* [`animationName`](https://developer.mozilla.org/en-US/docs/Web/API/AnimationEvent/animationName)
@@ -349,7 +349,7 @@ An event handler type for the [Clipboard API](https://developer.mozilla.org/en-U
349349
/>
350350
```
351351

352-
#### Parameters {/*clipboadevent-handler-parameters*/}
352+
#### Parametrit {/*clipboadevent-handler-parameters*/}
353353

354354
* `e`: A [React event object](#react-event-object) with these extra [`ClipboardEvent`](https://developer.mozilla.org/en-US/docs/Web/API/ClipboardEvent) properties:
355355

@@ -369,7 +369,7 @@ An event handler type for the [input method editor (IME)](https://developer.mozi
369369
/>
370370
```
371371

372-
#### Parameters {/*compositionevent-handler-parameters*/}
372+
#### Parametrit {/*compositionevent-handler-parameters*/}
373373

374374
* `e`: A [React event object](#react-event-object) with these extra [`CompositionEvent`](https://developer.mozilla.org/en-US/docs/Web/API/CompositionEvent) properties:
375375
* [`data`](https://developer.mozilla.org/en-US/docs/Web/API/CompositionEvent/data)
@@ -401,7 +401,7 @@ An event handler type for the [HTML Drag and Drop API](https://developer.mozilla
401401
</>
402402
```
403403

404-
#### Parameters {/*dragevent-handler-parameters*/}
404+
#### Parametrit {/*dragevent-handler-parameters*/}
405405

406406
* `e`: A [React event object](#react-event-object) with these extra [`DragEvent`](https://developer.mozilla.org/en-US/docs/Web/API/DragEvent) properties:
407407
* [`dataTransfer`](https://developer.mozilla.org/en-US/docs/Web/API/DragEvent/dataTransfer)
@@ -445,7 +445,7 @@ An event handler type for the focus events.
445445

446446
[See an example.](#handling-focus-events)
447447

448-
#### Parameters {/*focusevent-handler-parameters*/}
448+
#### Parametrit {/*focusevent-handler-parameters*/}
449449

450450
* `e`: A [React event object](#react-event-object) with these extra [`FocusEvent`](https://developer.mozilla.org/en-US/docs/Web/API/FocusEvent) properties:
451451
* [`relatedTarget`](https://developer.mozilla.org/en-US/docs/Web/API/FocusEvent/relatedTarget)
@@ -461,7 +461,7 @@ An event handler type for the focus events.
461461

462462
An event handler type for generic events.
463463

464-
#### Parameters {/*event-handler-parameters*/}
464+
#### Parametrit {/*event-handler-parameters*/}
465465

466466
* `e`: A [React event object](#react-event-object) with no additional properties.
467467

@@ -475,7 +475,7 @@ An event handler type for the `onBeforeInput` event.
475475
<input onBeforeInput={e => console.log('onBeforeInput')} />
476476
```
477477

478-
#### Parameters {/*inputevent-handler-parameters*/}
478+
#### Parametrit {/*inputevent-handler-parameters*/}
479479

480480
* `e`: A [React event object](#react-event-object) with these extra [`InputEvent`](https://developer.mozilla.org/en-US/docs/Web/API/InputEvent) properties:
481481
* [`data`](https://developer.mozilla.org/en-US/docs/Web/API/InputEvent/data)
@@ -495,7 +495,7 @@ An event handler type for keyboard events.
495495

496496
[See an example.](#handling-keyboard-events)
497497

498-
#### Parameters {/*keyboardevent-handler-parameters*/}
498+
#### Parametrit {/*keyboardevent-handler-parameters*/}
499499

500500
* `e`: A [React event object](#react-event-object) with these extra [`KeyboardEvent`](https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent) properties:
501501
* [`altKey`](https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/altKey)
@@ -536,7 +536,7 @@ An event handler type for mouse events.
536536

537537
[See an example.](#handling-mouse-events)
538538

539-
#### Parameters {/*mouseevent-handler-parameters*/}
539+
#### Parametrit {/*mouseevent-handler-parameters*/}
540540

541541
* `e`: A [React event object](#react-event-object) with these extra [`MouseEvent`](https://developer.mozilla.org/en-US/docs/Web/API/MouseEvent) properties:
542542
* [`altKey`](https://developer.mozilla.org/en-US/docs/Web/API/MouseEvent/altKey)
@@ -579,7 +579,7 @@ An event handler type for [pointer events.](https://developer.mozilla.org/en-US/
579579

580580
[See an example.](#handling-pointer-events)
581581

582-
#### Parameters {/*pointerevent-handler-parameters*/}
582+
#### Parametrit {/*pointerevent-handler-parameters*/}
583583

584584
* `e`: A [React event object](#react-event-object) with these extra [`PointerEvent`](https://developer.mozilla.org/en-US/docs/Web/API/PointerEvent) properties:
585585
* [`height`](https://developer.mozilla.org/en-US/docs/Web/API/PointerEvent/height)
@@ -632,7 +632,7 @@ An event handler type for [touch events.](https://developer.mozilla.org/en-US/do
632632
/>
633633
```
634634

635-
#### Parameters {/*touchevent-handler-parameters*/}
635+
#### Parametrit {/*touchevent-handler-parameters*/}
636636

637637
* `e`: A [React event object](#react-event-object) with these extra [`TouchEvent`](https://developer.mozilla.org/en-US/docs/Web/API/TouchEvent) properties:
638638
* [`altKey`](https://developer.mozilla.org/en-US/docs/Web/API/TouchEvent/altKey)
@@ -661,7 +661,7 @@ An event handler type for the CSS transition events.
661661
/>
662662
```
663663

664-
#### Parameters {/*transitionevent-handler-parameters*/}
664+
#### Parametrit {/*transitionevent-handler-parameters*/}
665665

666666
* `e`: A [React event object](#react-event-object) with these extra [`TransitionEvent`](https://developer.mozilla.org/en-US/docs/Web/API/TransitionEvent) properties:
667667
* [`elapsedTime`](https://developer.mozilla.org/en-US/docs/Web/API/TransitionEvent/elapsedTime)
@@ -680,7 +680,7 @@ An event handler type for generic UI events.
680680
/>
681681
```
682682

683-
#### Parameters {/*uievent-handler-parameters*/}
683+
#### Parametrit {/*uievent-handler-parameters*/}
684684

685685
* `e`: A [React event object](#react-event-object) with these extra [`UIEvent`](https://developer.mozilla.org/en-US/docs/Web/API/UIEvent) properties:
686686
* [`detail`](https://developer.mozilla.org/en-US/docs/Web/API/UIEvent/detail)
@@ -698,7 +698,7 @@ An event handler type for the `onWheel` event.
698698
/>
699699
```
700700

701-
#### Parameters {/*wheelevent-handler-parameters*/}
701+
#### Parametrit {/*wheelevent-handler-parameters*/}
702702

703703
* `e`: A [React event object](#react-event-object) with these extra [`WheelEvent`](https://developer.mozilla.org/en-US/docs/Web/API/WheelEvent) properties:
704704
* [`deltaMode`](https://developer.mozilla.org/en-US/docs/Web/API/WheelEvent/deltaMode)
@@ -733,7 +733,7 @@ An event handler type for the `onWheel` event.
733733

734734
---
735735

736-
## Usage {/*usage*/}
736+
## Käyttö {/*usage*/}
737737

738738
### Applying CSS styles {/*applying-css-styles*/}
739739

0 commit comments

Comments
 (0)