Skip to content

Commit 03f8fb0

Browse files
authored
Merge pull request #287 from Avrhamwales/merge-bugs-fix
Merge bugs fix
2 parents 951f89f + 079f493 commit 03f8fb0

7 files changed

Lines changed: 8 additions & 63 deletions

File tree

content/docs/components-and-props.md

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -74,21 +74,14 @@ const element = <Welcome name="Sara" />;
7474
root.render(element);
7575
```
7676

77-
**[Try it on CodePen](https://codepen.io/gaearon/pen/YGYmEG?editors=1010)**
77+
**[נסו את זה ב-codepen](https://codepen.io/gaearon/pen/YGYmEG?editors=1010)**
7878

7979
בואו נסכם מה קורה בדוגמה זו:
8080

81-
<<<<<<< HEAD
8281
1. אנחנו קוראים ל-`ReactDOM.render()` עם האלמנט `<Welcome name="Sara" />`.
8382
2. React קוראת לקומפוננטת `Welcome` עם `{name: 'Sara'}` בתור ה-props.
8483
3. קומפוננטת `Welcome` שלנו מחזירה אלמנט `<h1>Hello, Sara</h1>` בתור התוצאה שלה.
8584
4. React DOM מעדכן ביעילות את ה-DOM להיות תואם ל-`<h1>Hello, Sara</h1>`.
86-
=======
87-
1. We call `root.render()` with the `<Welcome name="Sara" />` element.
88-
2. React calls the `Welcome` component with `{name: 'Sara'}` as the props.
89-
3. Our `Welcome` component returns a `<h1>Hello, Sara</h1>` element as the result.
90-
4. React DOM efficiently updates the DOM to match `<h1>Hello, Sara</h1>`.
91-
>>>>>>> 84ad3308338e2bb819f4f24fa8e9dfeeffaa970b
9285

9386
>**הערה:** יש להתחיל שמות קומפוננטות עם אות גדולה.
9487
>
@@ -118,7 +111,7 @@ function App() {
118111
}
119112
```
120113

121-
**[Try it on CodePen](https://codepen.io/gaearon/pen/KgQKPr?editors=1010)**
114+
**[נסו את זה ב-codepen](https://codepen.io/gaearon/pen/KgQKPr?editors=1010)**
122115

123116
בדרך כלל, אפליקציות React חדשות כוללות קומפוננטת `App` אחת בראש האפליקציה. עם זאת, אם תשלבו את React באפליקציה קיימת, תוכלו להתחיל מלמטה למעלה באמצעות קומפוננטה קטנה כגון `Button`, ובהדרגה להגיע לחלק העליון ביותר של הירארכיית התצוגה.
124117

@@ -152,7 +145,7 @@ function Comment(props) {
152145
}
153146
```
154147

155-
**[Try it on CodePen](https://codepen.io/gaearon/pen/VKQwEo?editors=1010)**
148+
**[נסו את זה ב-codepen](https://codepen.io/gaearon/pen/VKQwEo?editors=1010)**
156149

157150
היא מקבלת את `author` (אובייקט), `text` (מחרוזת) ו-`date` (תאריך) בתור props, ומתארת תגובה באתר אינטרנט של מדיה חברתית.
158151

@@ -231,7 +224,7 @@ function Comment(props) {
231224
}
232225
```
233226

234-
**[Try it on CodePen](https://codepen.io/gaearon/pen/rrJNJY?editors=1010)**
227+
**[נסו את זה ב-codepen](https://codepen.io/gaearon/pen/rrJNJY?editors=1010)**
235228

236229
חילוץ קומפוננטות אולי נראה כמו עבודה שחורה בהתחלה, אבל בעלות על מגוון קומפוננטות לשימוש חוזר משתלמת באפליקציות גדולות יותר. כלל אצבע טוב הוא שאם חלק מממשק המשתמש שלכם נמצא בשימוש מספר פעמים (`Button`, `Panel`, `Avatar`), או שהוא מורכב מספיק בכוחות עצמו (`App`, `FeedStory`, `Comment`), הוא מועמד טוב להיות מחולץ לקומפוננטה אחרת.
237230

content/docs/forms.md

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -275,12 +275,7 @@ this.setState(partialState);
275275
הקוד הבא מדגים זאת. (ה-input נעול בהתחלה, אך הופך לניתן לעריכה לאחר עיכוב קצר).
276276

277277
```javascript
278-
<<<<<<< HEAD
279278
ReactDOM.render(<input value="היי" />, mountNode);
280-
=======
281-
ReactDOM.createRoot(mountNode).render(<input value="hi" />);
282-
>>>>>>> 84ad3308338e2bb819f4f24fa8e9dfeeffaa970b
283-
284279
setTimeout(function() {
285280
ReactDOM.createRoot(mountNode).render(<input value={null} />);
286281
}, 1000);

content/docs/introducing-jsx.md

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -33,18 +33,13 @@ React [לא דורשת](/docs/react-without-jsx.html) שימוש ב-JSX, אבל
3333
בדוגמה הבאה, אנו מכריזים על משתנה הנקרא `name` (שם) ולאחר מכן משתמשים בו בתוך JSX על ידי עטיפתו בסוגריים מסולסלים:
3434

3535
```js{1,2}
36-
<<<<<<< HEAD
3736
const name = 'גיא פרץ';
3837
const element = <h1>שלום, {name}</h1>;
3938
4039
ReactDOM.render(
4140
element,
4241
document.getElementById('root')
4342
);
44-
=======
45-
const name = 'Josh Perez';
46-
const element = <h1>Hello, {name}</h1>;
47-
>>>>>>> 84ad3308338e2bb819f4f24fa8e9dfeeffaa970b
4843
```
4944

5045
ניתן לשים כל [ביטוי JavaScript](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Expressions_and_Operators#Expressions) חוקי בתוך סוגריים מסולסלים ב-JSX. לדוגמה, `2 + 2`, `user.firstName`, או `formatName(user)` הם כולם ביטויים חוקיים ב-JavaScript.
@@ -68,7 +63,7 @@ const element = (
6863
);
6964
```
7065

71-
**[Try it on CodePen](https://codepen.io/gaearon/pen/PGEjdG?editors=1010)**
66+
**[נסו את זה ב-codepen](https://codepen.io/gaearon/pen/PGEjdG?editors=1010)**
7267

7368
אנו מפצלים את JSX על מספר שורות עבור הקריאות. אף על פי שזה לא נדרש, כאשר עושים זאת, אנו ממליצים גם לעטוף אותו בסוגריים כדי למנוע את החסרונות של [הכנסת נקודה-פסיק אוטומטית](https://stackoverflow.com/q/2846283).
7469

content/docs/lists-and-keys.md

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,11 +33,7 @@ const listItems = numbers.map((number) =>
3333
);
3434
```
3535

36-
<<<<<<< HEAD
3736
אנו מכלילים את המערך `listItems` כולו לתוך אלמנט `<ul>`, ו[מרדנדרים את ה-DOM](/docs/rendering-elements.html#rendering-an-element-into-the-dom).
38-
=======
39-
Then, we can include the entire `listItems` array inside a `<ul>` element:
40-
>>>>>>> 84ad3308338e2bb819f4f24fa8e9dfeeffaa970b
4137

4238
```javascript{2}
4339
<ul>{listItems}</ul>

content/docs/rendering-elements.md

Lines changed: 2 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -34,60 +34,38 @@ Unlike browser DOM elements, React elements are plain objects, and are cheap to
3434

3535
בדרך כלל, אפליקציות הנבנות עם ריאקט הן בעלות קודקוד DOM שורשי אחד. במידה ואתה משלב את ריאקט לתוך אפליקציה קיימת, אתה יכול להשתמש בכמות בלתי מוגבלת של קודקודי DOM שורשיים.
3636

37-
<<<<<<< HEAD
3837
על מנת לצייר אלמנט ריאקטי לתוך קודקוד DOM שורשי, העבר אותם אל הפונקציה [`ReactDOM.render()`](/docs/react-dom.html#render):
39-
=======
40-
To render a React element, first pass the DOM element to [`ReactDOM.createRoot()`](/docs/react-dom-client.html#createroot), then pass the React element to `root.render()`:
41-
>>>>>>> 84ad3308338e2bb819f4f24fa8e9dfeeffaa970b
42-
4338
`embed:rendering-elements/render-an-element.js`
4439

45-
**[Try it on CodePen](https://codepen.io/gaearon/pen/ZpvBNJ?editors=1010)**
40+
**[נסו את זה ב-codepen](https://codepen.io/gaearon/pen/ZpvBNJ?editors=1010)**
4641

4742
דוגמא זו מציגה "Hello, world" בעמוד.
4843

4944
## עדכון אלמנטים שצוירו {#updating-the-rendered-element}
5045

5146
אלמנטי ריאקט [אינם משתנים](https://en.wikipedia.org/wiki/Immutable_object). במידה ויצרת אלמנט, לא ניתן לשנות את ילדיו או מאפייניו. אלמנט הוא כמו פרים יחיד בסרט: הוא מייצג את ממשק המשתמש בנקודה מסויימת בזמן.
5247

53-
<<<<<<< HEAD
5448
עם הידע שלמדנו על כה, הדרך היחידה לעדכן את ממשק המשתמש הוא על ידי יצירה של אלמנט חדש והעברה שלו ל[`ReactDOM.render()`](/docs/react-dom.html#render).
55-
=======
56-
With our knowledge so far, the only way to update the UI is to create a new element, and pass it to `root.render()`.
57-
>>>>>>> 84ad3308338e2bb819f4f24fa8e9dfeeffaa970b
5849

5950
בהתחשב בדוגמת השעון המתקתק:
6051

6152
`embed:rendering-elements/update-rendered-element.js`
6253

63-
**[Try it on CodePen](https://codepen.io/gaearon/pen/gwoJZk?editors=1010)**
54+
**[נסו את זה ב-codepen](https://codepen.io/gaearon/pen/gwoJZk?editors=1010)**
6455

65-
<<<<<<< HEAD
6656
דוגמא זו קוראת ל[`ReactDOM.render()`](/docs/react-dom.html#render) בכל שניה על ידי הפונקציה הנקראת על ידי [`setInterval()`](https://developer.mozilla.org/en-US/docs/Web/API/WindowTimers/setInterval).
67-
=======
68-
It calls [`root.render()`](/docs/react-dom.html#render) every second from a [`setInterval()`](https://developer.mozilla.org/en-US/docs/Web/API/WindowTimers/setInterval) callback.
69-
>>>>>>> 84ad3308338e2bb819f4f24fa8e9dfeeffaa970b
7057

7158
>**הערה:**
7259
>
73-
<<<<<<< HEAD
7460
>בפועל, רוב אפליקציות ריאקט קוראות ל[`ReactDOM.render()`](/docs/react-dom.html#render) פעם אחת בלבד. בפרקים הבאים נלמד איך קוד כזה מוכמס ל[קומפוננטות בעלות state](/docs/state-and-lifecycle.html).
75-
76-
=======
77-
>In practice, most React apps only call `root.render()` once. In the next sections we will learn how such code gets encapsulated into [stateful components](/docs/state-and-lifecycle.html).
78-
>>>>>>> 84ad3308338e2bb819f4f24fa8e9dfeeffaa970b
7961
>
8062
>אנו ממליצים לא לדלג על נושאים מכיוון שהם נבנו אחד על השני.
8163
8264
## ריאקט מעדכן רק מה שנחוץ לעדכן {#react-only-updates-whats-necessary}
8365

8466
React DOM משווה את האלמנט וילדיו למצב הקודם שלו ומחיל אך ורק שינויים נדרשים בDOM על מנת להביא אותו למצב הרצוי.
8567

86-
<<<<<<< HEAD
8768
אתה יכול לאמת זאת על ידי התבוננות [בדוגמא](codepen://rendering-elements/update-rendered-element) באמצעות כלי הדפדפן:
88-
=======
89-
You can verify by inspecting the [last example](https://codepen.io/gaearon/pen/gwoJZk?editors=1010) with the browser tools:
90-
>>>>>>> 84ad3308338e2bb819f4f24fa8e9dfeeffaa970b
9169

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

content/docs/state-and-lifecycle.md

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,7 @@ next: handling-events.html
1010

1111
דף זה מציג את הקונספט של state ומחזור חיים בקומפוננטת React. תוכלו למצוא את [פירוט ה-API של קומפוננטה כאן](/docs/react-component.html).
1212

13-
<<<<<<< HEAD
1413
הביטו על דוגמת השעון המתקתק מ[אחד מהחלקים הקודמים](/docs/rendering-elements.html#updating-the-rendered-element). ב[רינדור אלמנטים](/docs/rendering-elements.html#rendering-an-element-into-the-dom), למדנו רק דרך אחת לעדכון ממשק המשתמש. אנו קוראים ל-`ReactDOM.render()` כדי לשנות את הפלט שירונדר:
15-
=======
16-
Consider the ticking clock example from [one of the previous sections](/docs/rendering-elements.html#updating-the-rendered-element). In [Rendering Elements](/docs/rendering-elements.html#rendering-an-element-into-the-dom), we have only learned one way to update the UI. We call `root.render()` to change the rendered output:
17-
>>>>>>> 84ad3308338e2bb819f4f24fa8e9dfeeffaa970b
1814

1915
```js{10}
2016
const root = ReactDOM.createRoot(document.getElementById('root'));
@@ -298,11 +294,7 @@ root.render(<Clock />);
298294

299295
בואו נסכם בזריזות את מה שקורה ואת הסדר שבו מתודות נקראות:
300296

301-
<<<<<<< HEAD
302297
1) כאשר `<Clock />` מועבר ל-`ReactDOM.render()`, React קוראת לבנאי של הרכיב `Clock`. מכיוון ש-`Clock` צריך להציג את השעה הנוכחית, הוא מאתחל את `this.state` עם אובייקט שכולל את הזמן הנוכחי. בהמשך נעדכן את ה-state הזה.
303-
=======
304-
1) When `<Clock />` is passed to `root.render()`, React calls the constructor of the `Clock` component. Since `Clock` needs to display the current time, it initializes `this.state` with an object including the current time. We will later update this state.
305-
>>>>>>> 84ad3308338e2bb819f4f24fa8e9dfeeffaa970b
306298

307299
2) אז React קוראת למתודת `render()` של קומפוננטת ה-`Clock`. באופן זה React לומדת מה צריך להיות מוצג על המסך. אז React מעדכנת את ה-DOM כדי שיהיה תואם לפלט שרונדר על ידי `Clock`.
308300

content/docs/thinking-in-react.md

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
id: thinking-in-react
3-
title: Thinking in React
3+
title: חשיבה ב-React
44
permalink: docs/thinking-in-react.html
55
redirect_from:
66
- 'blog/2013/11/05/thinking-in-react.html'
@@ -67,11 +67,7 @@ React, לפי דעתנו, היא ספריית הג'וואה-סקריפט המו
6767

6868
נוכל לבנות מלמעלה למטה או מלמטה למעלה. שזה אומר שנוכל להתחיל לבנות את הקומפוננטות מלמעלה בהירככיה( נתחיל מFilterableProductTable ) או מהקומפוננטות התחתונות בהיררכיה( ProductRow ). בדוגמות פשוטות יותר, זה קל יותר להתחיל מלמעלה למטה, ובפרויקטים גדולים, זה קל יותר להתחיל מלמטה למעלה ולכתוב tests במקביל לבנייה.
6969

70-
<<<<<<< HEAD
7170
בסוף השלב הזה, יהיה לנו ספרייה של קומפוננטות שמישות שמרנדרות את מודל המידע. הקומפוננטות יכילו רק מתודות render() מכיון שזוהי גרסה סטטית של היישום. הקומפוננטה בראש ההיררכיה(FilterableProductTable) תיקח את מודל המידע כprop שיועבר לה. אם נבצע שינוי למודל המידע ונקרא ל ReactDOM.render() שוב, ממשק המשתמש יעודכן. זה פשוט לראות איך ממשק המשתמש מעודכן והיכן לבצע שינויים מכיוון ששום דבר מסובך לא מתבצע. **העברת המידע בכיוון אחד** של React משאירה הכל בצורה מודולרית ומהירה.
72-
=======
73-
At the end of this step, you'll have a library of reusable components that render your data model. The components will only have `render()` methods since this is a static version of your app. The component at the top of the hierarchy (`FilterableProductTable`) will take your data model as a prop. If you make a change to your underlying data model and call `root.render()` again, the UI will be updated. You can see how your UI is updated and where to make changes. React's **one-way data flow** (also called *one-way binding*) keeps everything modular and fast.
74-
>>>>>>> 84ad3308338e2bb819f4f24fa8e9dfeeffaa970b
7571

7672
קרא עוד ב[תיעוד של ריאקט](/docs/getting-started.html) אם תצטרך עזרה בביצוע שלב זה.
7773

0 commit comments

Comments
 (0)