Count: {state.count}
- - +العدد: {state.count}
+ +Current theme: {theme}
+المظهر الحالي: {theme}
Current object: {object.kind}
+الكائن الحالي: {object.kind}
Value: {value}
+القيمة: {value}
> ); } ``` -## Useful Types {/*useful-types*/} +## أنواع مفيدة {/*useful-types*/} -There is quite an expansive set of types which come from the `@types/react` package, it is worth a read when you feel comfortable with how React and TypeScript interact. You can find them [in React's folder in DefinitelyTyped](https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/types/react/index.d.ts). We will cover a few of the more common types here. +توجد مجموعة واسعة من الأنواع في حزمة `@types/react`، ومن المفيد الاطلاع عليها عندما تشعر بالراحة في كيفية تفاعل React مع TypeScript. يمكنك العثور عليها [في مجلد React في DefinitelyTyped](https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/types/react/index.d.ts). سنراجع هنا بعض الأنواع الأكثر شيوعًا. -### DOM Events {/*typing-dom-events*/} +### أحداث DOM {/*typing-dom-events*/} -When working with DOM events in React, the type of the event can often be inferred from the event handler. However, when you want to extract a function to be passed to an event handler, you will need to explicitly set the type of the event. +عند العمل مع أحداث DOM في React، يمكن غالبًا استنتاج نوع الحدث من معالج الحدث. ومع ذلك، عندما تريد استخراج دالة لتمريرها إلى معالج حدث، ستحتاج إلى تحديد نوع الحدث صراحةً.Value: {value}
+القيمة: {value}
> ); } @@ -419,15 +418,15 @@ export default App = AppTSX;