Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 125
docs(uk): translate useDebugValue.md to Ukrainian#635
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base:main
Are you sure you want to change the base?
Uh oh!
There was an error while loading. Please reload this page.
Changes from all commits
File filter
Filter by extension
Conversations
Uh oh!
There was an error while loading. Please reload this page.
Jump to
Uh oh!
There was an error while loading. Please reload this page.
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
| @@ -4,7 +4,7 @@ title: useDebugValue | ||||||
| <Intro> | ||||||
| `useDebugValue` is a React Hook that lets you add a label to a custom Hook in [React DevTools.](/learn/react-developer-tools) | ||||||
| `useDebugValue` — це хук React, який дає змогу додати мітку до вашого користувацького хука в [React DevTools.](/learn/react-developer-tools) | ||||||
| ```js | ||||||
| useDebugValue(value, format?) | ||||||
| @@ -20,7 +20,7 @@ useDebugValue(value, format?) | ||||||
Collaborator There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. перекласти Reference як опис | ||||||
| ### `useDebugValue(value, format?)` {/*usedebugvalue*/} | ||||||
| Call `useDebugValue` at the top level of your [custom Hook](/learn/reusing-logic-with-custom-hooks) to display a readable debug value: | ||||||
| Викликайте `useDebugValue` на верхньому рівні вашого [користувацького хуку](/learn/reusing-logic-with-custom-hooks), щоб показати зручне для читання значення для налагодження: | ||||||
Collaborator There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
| ||||||
| ```js | ||||||
| import { useDebugValue } from 'react'; | ||||||
| @@ -32,22 +32,22 @@ function useOnlineStatus() { | ||||||
| } | ||||||
Collaborator There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. тут і далі перекласти вивід у прикладах і текстах, що описують приклади, українською ("Онлайн", "Офлайн", "Від'єднано" тощо) | ||||||
| ``` | ||||||
| [See more examples below.](#usage) | ||||||
| [Дивіться більше прикладів нижче.](#usage) | ||||||
Collaborator There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
для консистентності з іншими статтями | ||||||
| #### Parameters {/*parameters*/} | ||||||
| #### Параметри {/*parameters*/} | ||||||
| * `value`: The value you want to display in React DevTools. It can have any type. | ||||||
| * **optional** `format`: A formatting function. When the component is inspected, React DevTools will call the formatting function with the `value` as the argument, and then display the returned formatted value (which may have any type). If you don't specify the formatting function, the original `value` itself will be displayed. | ||||||
| * `value`: Значення, яке ви хочете показати в React DevTools. Може бути будь‑якого типу. | ||||||
| * **необов'язково** `format`: Функція форматування. Коли компонент буде інспектовано, React DevTools викличе цю функцію, передавши `value` як аргумент, а потім відобразить повернуте відформатоване значення (яке також може бути будь‑якого типу). Якщо ви не вкажете функцію форматування, буде показано початкове значення `value`. | ||||||
| ||||||
| ***необов'язково**`format`: Функція форматування. Коли компонент буде інспектовано, React DevTools викличе цю функцію, передавши `value` як аргумент, а потім відобразить повернуте відформатоване значення (яке також може бути будь‑якого типу). Якщо ви не вкажете функцію форматування, буде показано початкове значення `value`. | |
| ***опційний**`format`: Функція форматування. Коли компонент буде інспектовано, React DevTools викличе цю функцію, передавши `value` як аргумент, а потім відобразить повернуте відформатоване значення (яке також може бути будь‑якого типу). Якщо ви не вкажете функцію форматування, буде показано початкове значення `value`. |
- попередньо домовилися optional перекладати як опційний (або навіть опційний параметр)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| #### Повертає {/*returns*/} | |
| #### Результат {/*returns*/} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| Це дає змогу уникнути виконання потенційно «дорогої» логіки форматування, доки компонент фактично не буде інспектовано. Наприклад, якщо `date` — це об’єкт Date, ви таким чином не викликаєте`toDateString()` на кожному рендері. | |
| Це дає змогу уникнути виконання потенційно "дорогої" логіки форматування, доки компонент фактично не буде інспектовано. Наприклад, якщо `date` — це об'єкт Date, ви так не викликатимете`toDateString()` на кожному рендері. |
- поки що використовуємо машинописні лапки
"та апостроф' - https://onlinecorrector.com.ua/%D0%BE%D1%82%D0%B6%D0%B5-%D1%83-%D1%82%D0%B0%D0%BA%D0%B8%D0%B9-%D1%81%D0%BF%D0%BE%D1%81%D1%96%D0%B1/
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
uk.react.dev/TRANSLATION.md
Line 143 in 77b50ec
змінити тут і далі