Skip to content

Commit

Permalink
Translation of (Reacting to input): Rephrasing
Browse files Browse the repository at this point in the history
Co-authored-by: Ahmed Abdelbaset <A7med3bdulBaset@gmail.com>
  • Loading branch information
Rumbustious and AhmedBaset authored Oct 10, 2023
1 parent a537b06 commit b11aead
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/content/learn/reacting-to-input-with-state.md
Original file line number Diff line number Diff line change
Expand Up @@ -351,7 +351,7 @@ body { margin: 0; direction: rtl; }

### الخطوة 3: مثّل الحالة في الذاكرة باستخدام `useState` {/*step-3-represent-the-state-in-memory-with-usestate*/}

يلي ذلك ستحتاج لتمثّل الحالات المرئية لمكوّنك في الذاكرة باستخدام [`useState`.](/reference/react/useState) البساطة هي المفتاح: كل قطعة من الحالة هي "قطعة متحركة"، و**التقليل من "القطع المتحركة" قدر الإمكان هذا ما تريده.** ;كثرة التعقيدات تؤدي إلى كثرة الأخطاء!
بعد ذلك ستحتاج لتمثّل الحالات المرئية لمكوّنك في الذاكرة باستخدام [`useState`.](/reference/react/useState) البساطة هي المفتاح: كل قطعة من الحالة هي "قطعة متحركة"، **وبالـتأكيد تريد تقليل "القطع المتحركة" قدر الإمكان.** ;كثرة التعقيدات تؤدي إلى كثرة الأخطاء!

ابدأ بالحالة التي *لا بدّ* من وجودها. على سبيل المثال، سوف تحتاج لتخزين الإجابة `answer` للمدخل، والخطأ `error` (لو وُجد) لتخزين آخر خطأ:

Expand Down

0 comments on commit b11aead

Please sign in to comment.