Skip to content

Commit 707b275

Browse files
authored
Apply suggestions from code review
1 parent eba64f5 commit 707b275

File tree

2 files changed

+0
-12
lines changed

2 files changed

+0
-12
lines changed

src/content/learn/thinking-in-react.md

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -264,19 +264,11 @@ td {
264264

265265
حسنا، لنختبر طريقتنا عليهم:
266266

267-
<<<<<<< HEAD
268267
1. **حدد المكونات التي تستخدم الحالة:**
269268
* مكون `ProductTable` (جدول المنتجات) يحتاج الحالة ليقوم بتصفية قائمة المنتجات (نص البحث وحالة مربع الاختيار).
270269
* مكون `SearchBar` (خانة البحث) يقوم بعرض الحالة نفسها (نص البحث).
271270
1. **حدد لهم سلفا مشتركا:** السلف المشترك للمكونين هو `FilterableProductTable`.
272271
2. **حدد أين تضع الحالة**: سنضع نص البحث وحالة مربع الاختيار في المكون `FilterableProductTable`.
273-
=======
274-
1. **Identify components that use state:**
275-
* `ProductTable` needs to filter the product list based on that state (search text and checkbox value).
276-
* `SearchBar` needs to display that state (search text and checkbox value).
277-
2. **Find their common parent:** The first parent component both components share is `FilterableProductTable`.
278-
3. **Decide where the state lives**: We'll keep the filter text and checked state values in `FilterableProductTable`.
279-
>>>>>>> 2b2d0f2309f49c82cf5bb88ea62fb2e44661c634
280272

281273
إذا، فقيم الحالات ستكون محفوظة لدى المكون `FilterableProductTable`.
282274

src/content/learn/tutorial-tic-tac-toe.md

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1148,11 +1148,7 @@ export default function Board() {
11481148
11491149
<Note>
11501150
1151-
<<<<<<< HEAD
11521151
تدعم JavaScript [الإغلاقات (closures)](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Closures) والتي تعني أن الدالة الداخلية (مثل `handleClick`) لديها وصول إلى المتغيرات والدوال المعرفة في الدالة الخارجية (مثل `Board`). يمكن لدالة `handleClick` قراءة حالة `squares` واستدعاء طريقة `setSquares` لأن كلاهما معرف داخل دالة `Board`.
1153-
=======
1154-
JavaScript supports [closures](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Closures) which means an inner function (e.g. `handleClick`) has access to variables and functions defined in an outer function (e.g. `Board`). The `handleClick` function can read the `squares` state and call the `setSquares` method because they are both defined inside of the `Board` function.
1155-
>>>>>>> 2b2d0f2309f49c82cf5bb88ea62fb2e44661c634
11561152
11571153
</Note>
11581154

0 commit comments

Comments
 (0)