Skip to content

Commit da0784d

Browse files
authored
Update hooks.md
1 parent ca9bf69 commit da0784d

1 file changed

Lines changed: 1 addition & 29 deletions

File tree

src/content/reference/react/hooks.md

Lines changed: 1 addition & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -106,42 +106,14 @@ function TodoList({ todos, tab, theme }) {
106106
107107
---
108108
109-
<<<<<<< HEAD
110-
## Хукі рэсурсаў {/*resource-hooks*/}
111-
112-
*Рэсурсы* — штосьці, да чаго кампаненты могуць атрымаць доступ, не маючы іх як частку ўласнага стану. Напрыклад, кампанент можа прачытаць паведамленне з Promise або інфармацыю пра тэму з кантэксту.
113-
114-
Для атрымання даных з рэсурсу, выкарыстоўвайце наступны хук:
115-
116-
- [`use`](/reference/react/use) дазваляе атрымліваць значэнні з такіх рэсурсаў, як [Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise) або [кантэкст](/learn/passing-data-deeply-with-context).
117-
118-
```js
119-
function MessageComponent({ messagePromise }) {
120-
const message = use(messagePromise);
121-
const theme = use(ThemeContext);
122-
// ...
123-
}
124-
```
125-
126-
---
127-
128109
## Іншыя хукі {/*other-hooks*/}
129-
=======
130-
## Other Hooks {/*other-hooks*/}
131-
>>>>>>> 9e1f5cd590fd066e72dda9022237bee30b499951
132110
133111
Гэтыя хукі болей карысныя аўтарам бібліятэк і не часта выкарыстоўваюцца ў кодзе праграм.
134112
135-
<<<<<<< HEAD
136113
- [`useDebugValue`](/reference/react/useDebugValue) дазваляе наладзіць пазнаку, якую React DevTools будзе паказваць для вашага хука.
137114
- [`useId`](/reference/react/useId) дазваляе кампаненту атрымаць унікальны ідэнтыфікатар. Звычайна выкарыстоўваецца з API спецыяльных магчымасцяў.
138115
- [`useSyncExternalStore`](/reference/react/useSyncExternalStore) дазваляе кампаненту падпісацца на знешняе сховішча.
139-
=======
140-
- [`useDebugValue`](/reference/react/useDebugValue) lets you customize the label React DevTools displays for your custom Hook.
141-
- [`useId`](/reference/react/useId) lets a component associate a unique ID with itself. Typically used with accessibility APIs.
142-
- [`useSyncExternalStore`](/reference/react/useSyncExternalStore) lets a component subscribe to an external store.
143-
* [`useActionState`](/reference/react/useActionState) allows you to manage state of actions.
144-
>>>>>>> 9e1f5cd590fd066e72dda9022237bee30b499951
116+
* [`useActionState`](/reference/react/useActionState) дазваляе кіраваць станам дзеянняў.
145117
146118
---
147119

0 commit comments

Comments
 (0)