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}
> ); } @@ -407,15 +410,15 @@ export default App = AppTSX;