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