-
Notifications
You must be signed in to change notification settings - Fork 127
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?
docs(uk): translate useDebugValue.md to Ukrainian #635
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. 1 Skipped Deployment
|
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.
Дякую за PR!
Запити на зміни мають бути виправлені і перевірені у всій статті. Немає вимог, коли має бути виправлено, це буде просто послідовна асинхронна взаємодія перевірка-зміни-перевірка-зміни-перевірка тощо.
| <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) |
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.
| `useDebugValue` — це хук React, який дає змогу додати мітку до вашого користувацького хука в [React DevTools.](/learn/react-developer-tools) | |
| `useDebugValue` — це хук React, який дає змогу додати мітку до вашого користувацького хука в [інструментах розробника React.](/learn/react-developer-tools) |
Line 143 in 77b50ec
| | React developer tools | інструменти розробника React | |
змінити тут і далі
| --- | ||
| ## Reference {/*reference*/} | ||
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.
перекласти 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), щоб показати зручне для читання значення для налагодження: |
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.
| Викликайте `useDebugValue` на верхньому рівні вашого [користувацького хуку](/learn/reusing-logic-with-custom-hooks), щоб показати зручне для читання значення для налагодження: | |
| Викличте `useDebugValue` на верхньому рівні вашого [користувацького хука](/learn/reusing-logic-with-custom-hooks), щоб показати зручне для читання значення для налагодження: |
- тут краще доконаний вид - змінити тут і далі для початкового речення в секції
- в родовому хука https://vesum.nlp.net.ua/?w=%D1%85%D1%83%D0%BA - змінити тут і далі
| // ... | ||
| useDebugValue(isOnline ? 'Online' : 'Offline'); | ||
| // ... | ||
| } |
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.
тут і далі перекласти вивід у прикладах і текстах, що описують приклади, українською ("Онлайн", "Офлайн", "Від'єднано" тощо)
| ``` | ||
| [See more examples below.](#usage) | ||
| [Дивіться більше прикладів нижче.](#usage) |
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.
| [Дивіться більше прикладів нижче.](#usage) | |
| [Перегляньте більше прикладів нижче.](#usage) |
для консистентності з іншими статтями
| * `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`. |
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.
| * **необов'язково** `format`: Функція форматування. Коли компонент буде інспектовано, React DevTools викличе цю функцію, передавши `value` як аргумент, а потім відобразить повернуте відформатоване значення (яке також може бути будь‑якого типу). Якщо ви не вкажете функцію форматування, буде показано початкове значення `value`. | |
| * **опційний** `format`: Функція форматування. Коли компонент буде інспектовано, React DevTools викличе цю функцію, передавши `value` як аргумент, а потім відобразить повернуте відформатоване значення (яке також може бути будь‑якого типу). Якщо ви не вкажете функцію форматування, буде показано початкове значення `value`. |
- попередньо домовилися optional перекладати як опційний (або навіть опційний параметр)
| * **необов'язково** `format`: Функція форматування. Коли компонент буде інспектовано, React DevTools викличе цю функцію, передавши `value` як аргумент, а потім відобразить повернуте відформатоване значення (яке також може бути будь‑якого типу). Якщо ви не вкажете функцію форматування, буде показано початкове значення `value`. | ||
| #### Returns {/*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.
| #### Повертає {/*returns*/} | |
| #### Результат {/*returns*/} |
| Це дає компонентам, які викликають `useOnlineStatus`, мітку на кшталт `OnlineStatus: "Online"`, коли ви їх інспектуєте: | ||
|  | ||
|  |
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.
| Ваша функція форматування отримає <CodeStep step={1}>значення для налагодження</CodeStep> як параметр і має повернути <CodeStep step={2}>відформатоване відображуване значення</CodeStep>. Коли ваш компонент буде інспектовано, React DevTools викличе цю функцію і відобразить її результат. | ||
| This lets you avoid running potentially expensive formatting logic unless the component is actually inspected. For example, if `date` is a Date value, this avoids calling `toDateString()` on it for every render. | ||
| Це дає змогу уникнути виконання потенційно «дорогої» логіки форматування, доки компонент фактично не буде інспектовано. Наприклад, якщо `date` — це об’єкт Date, ви таким чином не викликаєте `toDateString()` на кожному рендері. |
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/
Translate useDebugValue section to Ukrainian language