Skip to content

Commit a41f6ca

Browse files
authored
Merge pull request #21 from dormd/master
Translate rendering elements page to Hebrew
2 parents 14c093a + 1d5f8a7 commit a41f6ca

File tree

1 file changed

+26
-26
lines changed

1 file changed

+26
-26
lines changed

content/docs/rendering-elements.md

Lines changed: 26 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,75 +1,75 @@
11
---
22
id: rendering-elements
3-
title: Rendering Elements
3+
title: ציור אלמנטים
44
permalink: docs/rendering-elements.html
55
redirect_from:
66
- "docs/displaying-data.html"
77
prev: introducing-jsx.html
88
next: components-and-props.html
99
---
1010

11-
Elements are the smallest building blocks of React apps.
11+
אלמנטים הם אבן הבניין הקטנה ביותר של אפליקציות ריאקט
1212

13-
An element describes what you want to see on the screen:
13+
אלמנט מתאר מה רוצים להציג במסך:
1414

1515
```js
1616
const element = <h1>Hello, world</h1>;
1717
```
1818

1919
Unlike browser DOM elements, React elements are plain objects, and are cheap to create. React DOM takes care of updating the DOM to match the React elements.
20+
שלא כמו אלמנט DOM, אלמנטי ריאקט הם אובייקטים פשוטים וזולים ליצירה. React DOM מטפל בעדכון הDOM על מנת להתאים אותם לאלמנטים של ריאקט.
2021

21-
>**Note:**
22+
>**:הערה**
2223
>
23-
>One might confuse elements with a more widely known concept of "components". We will introduce components in the [next section](/docs/components-and-props.html). Elements are what components are "made of", and we encourage you to read this section before jumping ahead.
24+
>ניתן להתבלבל בין אלמנטים לבין הקונספט הידוע של קומפוננטות. נציג את רעיון הקומפוננטות [בפרק הבא](/docs/components-and-props.html). אלמנטים הם המרכיבים שמהם עשויות קומפוננטות ואנחנו מעודדים לקרוא פרק זה לפני שממשיכים הלאה.
2425
25-
## Rendering an Element into the DOM {#rendering-an-element-into-the-dom}
26-
27-
Let's say there is a `<div>` somewhere in your HTML file:
26+
## ציור אלמנטים לתוך הDOM {#rendering-an-element-into-the-dom}
27+
נניח שיש `<div>` במקום כלשהו בקובץ HTML:
2828

2929
```html
3030
<div id="root"></div>
3131
```
3232

33-
We call this a "root" DOM node because everything inside it will be managed by React DOM.
33+
אנחנו מכנים זאת כקודקוד DOM שורשי מכיוון שכל מה שהוא מכיל ינוהל על ידי React DOM.
3434

35-
Applications built with just React usually have a single root DOM node. If you are integrating React into an existing app, you may have as many isolated root DOM nodes as you like.
35+
בדרך כלל, אפליקציות הנבנות עם ריאקט הן בעלות קודקוד DOM שורשי אחד. במידה ואתה משלב את ריאקט לתוך אפליקציה קיימת, אתה יכול להשתמש בכמות בלתי מוגבלת של קודקודי DOM שורשיים.
3636

37-
To render a React element into a root DOM node, pass both to `ReactDOM.render()`:
37+
על מנת לצייר אלמנט ריאקטי לתוך קודקוד DOM שורשי, העבר אותם אל הפונקציה `ReactDOM.render()`:
3838

3939
`embed:rendering-elements/render-an-element.js`
4040

4141
[](codepen://rendering-elements/render-an-element)
4242

43-
It displays "Hello, world" on the page.
43+
דוגמא זו מציגה "Hello, world" בעמוד.
4444

45-
## Updating the Rendered Element {#updating-the-rendered-element}
45+
## עדכון אלמנטים שצוירו {#updating-the-rendered-element}
4646

47-
React elements are [immutable](https://en.wikipedia.org/wiki/Immutable_object). Once you create an element, you can't change its children or attributes. An element is like a single frame in a movie: it represents the UI at a certain point in time.
47+
אלמנטי ריאקט [אינם משתנים](https://en.wikipedia.org/wiki/Immutable_object). במידה ויצרת אלמנט, לא ניתן לשנות את ילדיו או מאפייניו. אלמנט הוא כמו פרים יחיד בסרט: הוא מייצג את ממשק המשתמש בנקודה מסויימת בזמן.
4848

49-
With our knowledge so far, the only way to update the UI is to create a new element, and pass it to `ReactDOM.render()`.
49+
עם הידע שלמדנו על כה, הדרך היחידה לעדכן את ממשק המשתמש הוא על ידי יצירה של אלמנט חדש והעברה שלו ל`ReactDOM.render()`.
5050

51-
Consider this ticking clock example:
51+
בהתחשב בדוגמת השעון המתקתק:
5252

5353
`embed:rendering-elements/update-rendered-element.js`
5454

5555
[](codepen://rendering-elements/update-rendered-element)
5656

57-
It calls `ReactDOM.render()` every second from a [`setInterval()`](https://developer.mozilla.org/en-US/docs/Web/API/WindowTimers/setInterval) callback.
57+
דוגמא זו קוראת ל`ReactDOM.render()` בכל שניה על ידי הפונקציה הנקראת על ידי [`setInterval()`](https://developer.mozilla.org/en-US/docs/Web/API/WindowTimers/setInterval).
5858

59-
>**Note:**
59+
>**הערה:**
6060
>
61-
>In practice, most React apps only call `ReactDOM.render()` once. In the next sections we will learn how such code gets encapsulated into [stateful components](/docs/state-and-lifecycle.html).
61+
>בפועל, רוב אפליקציות ריאקט קוראות ל`ReactDOM.render()` פעם אחת בלבד. בפרקים הבאים נלמד איך קוד כזה מוכמס ל[קומפוננטות בעלות state](/docs/state-and-lifecycle.html).
6262
>
63-
>We recommend that you don't skip topics because they build on each other.
63+
>אנו ממליצים לא לדלג על נושאים מכיוון שהם נבנו אחד על השני.
6464
65-
## React Only Updates What's Necessary {#react-only-updates-whats-necessary}
65+
## ריאקט מעדכן רק מה שנחוץ לעדכן {#react-only-updates-whats-necessary}
6666

67-
React DOM compares the element and its children to the previous one, and only applies the DOM updates necessary to bring the DOM to the desired state.
67+
React DOM משווה את האלמנט וילדיו למצב הקודם שלו ומחיל אך ורק שינויים נדרשים בDOM על מנת להביא אותו למצב הרצוי.
6868

69-
You can verify by inspecting the [last example](codepen://rendering-elements/update-rendered-element) with the browser tools:
69+
אתה יכול לאמת זאת על ידי התבוננות [בדוגמא](codepen://rendering-elements/update-rendered-element) באמצעות כלי הדפדפן:
7070

71-
![DOM inspector showing granular updates](../images/docs/granular-dom-updates.gif)
71+
![DOM inspector המציג את העדכונים הפרטניים](../images/docs/granular-dom-updates.gif)
7272

73-
Even though we create an element describing the whole UI tree on every tick, only the text node whose contents has changed gets updated by React DOM.
73+
אפילו כשאנחנו יוצרים אלמנט המתאר את עץ ממשק המשתמש המלא בכל תקתוק של השעון, רק קודקוד הטקסט שתוכנו השתנה יעודכן על ידי React DOM.
7474

75-
In our experience, thinking about how the UI should look at any given moment rather than how to change it over time eliminates a whole class of bugs.
75+
מהניסיון שלנו, חשיבה על איך ממשק המשתמש צריך להראות בכל רגע נתון לעומת איך לשנות אותו לאורך זמן מבטל כמות נכבדת של באגים.

0 commit comments

Comments
 (0)