Skip to content

Commit a1fe254

Browse files
authored
fix the confilict
1 parent 8373a4c commit a1fe254

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

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

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1188,11 +1188,10 @@ Too many re-renders. React limits the number of renders to prevent an infinite l
11881188
11891189
الترجمة: عمليات إعادة التصيير كثيرة جدًا. يحدّ React عدد عمليات إعادة التصيير لمنع حدوث حلقة لا نهائية.
11901190
1191-
<<<<<<< HEAD
11921191
</Note>
1193-
=======
1194-
You could fix this by creating a function like `handleFirstSquareClick` that calls `handleClick(0)`, a function like `handleSecondSquareClick` that calls `handleClick(1)`, and so on. You would pass (rather than call) these functions down as props like `onSquareClick={handleFirstSquareClick}`. This would solve the infinite loop.
1195-
>>>>>>> 819518cfe32dd2db3b765410247c30feea713c77
1192+
1193+
يمكنك إصلاح ذلك عن طريق إنشاء دالة مثل `handleFirstSquareClick` التي تنادي `handleClick(0)`، ودالة مثل `handleSecondSquareClick` التي تنادي `handleClick(0)`، وهكذا... ربما تمرر (بدلًا من مناداة) هذه الدوال كخصائص إلى المكونات الفرعية. مثل `onSquareClick={handleFirstSquareClick}`. هذا قد يحل الدورة اللانهائية.
1194+
11961195
11971196
لماذا لم تحدث هذه المشكلة من قبل؟
11981197

0 commit comments

Comments
 (0)