Skip to content

Conversation

@LeoMorgan113
Copy link

Hi all,

Here is my translation of the useId documentation page.
Feel free to review and write your comments.

@vercel
Copy link

vercel bot commented Oct 20, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Preview Comments Updated (UTC)
uk-legacy-reactjs-org Ignored Ignored Preview Oct 20, 2025 11:12am

💡 Enable Vercel Agent with $100 free credit for automated AI reviews

Copy link
Collaborator

@alinkedd alinkedd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Дякую за PR!

Запити на зміни мають бути виправлені і перевірені у всій статті. Немає вимог, коли має бути виправлено, це буде просто послідовна асинхронна взаємодія перевірка-зміни-перевірка-зміни-перевірка тощо.

Рекомендую локально запустити документацію і перевірити, по-перше, чому падає збірка, по-друге, після виправлення цього відкрити сторінку і подивитися на переклад як читач, можливо, захочеться щось переписати, щоб було зрозуміліше.

Якщо будуть складніші питання чи потрібна серйозніша допомога або консультації, то є дискорд-сервер https://discord.gg/WM6PmCpp7W

<Intro>

`useId` is a React Hook for generating unique IDs that can be passed to accessibility attributes.
`useId` — це хук для генерації унікальних ID, які можуть передаватись як атрибути доступності.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
`useId` — це хук для генерації унікальних ID, які можуть передаватись як атрибути доступності.
`useId` — це хук для генерації унікальних ідентифікаторів (_далі_ — ID), які можуть передаватися як атрибути доступності.
  1. я би ввела на початку назву українською, а потім вже використовувала б англійську абревіатуру
  2. чергування

---

## Reference {/*reference*/}
## Референс {/*reference*/}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
## Референс {/*reference*/}
## Опис {/*reference*/}

#567

### `useId()` {/*useid*/}

Call `useId` at the top level of your component to generate a unique ID:
Викликайте `useId` на верхньому рівні вашого компонента, щоб згенерувати унікальне ID:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Викликайте `useId` на верхньому рівні вашого компонента, щоб згенерувати унікальне ID:
Викличте `useId` на верхньому рівні вашого компонента, щоб згенерувати унікальне ID:
  1. тут зазвичай доконаний вид використовували
  2. треба подумати, чи рід у ID буде середній за саме словом айді суб'єктивно (мені теж хочеться середнього роду, хоч айді може бути жіночого роду для як ідентифікацяя) або чоловічий за ідентифікатором. я поки не буду виправляти

#### Параметри {/*parameters*/}
`useId` does not take any parameters.
`useId` не приймає ніяких параметрів.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
`useId` не приймає ніяких параметрів.
`useId` не приймає жодних параметрів.

https://onlinecorrector.com.ua/%D0%B6%D0%BE%D0%B4%D0%BD%D0%B8%D0%B9-2/

#### Результат {/*returns*/}
`useId` returns a unique ID string associated with this particular `useId` call in this particular component.
`useId` повертає унікальну ID строку, пов'язану з конкретним запитом `useId` в цьому конкретному компоненті.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
`useId` повертає унікальну ID строку, пов'язану з конкретним запитом `useId` в цьому конкретному компоненті.
`useId` повертає унікальну ID-стрічку, пов'язану з конкретним запитом `useId` в цьому конкретному компоненті.

<!DOCTYPE html>
<html>
<head><title>My app</title></head>
<head><title>Мій додаток</title></head>
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
<head><title>Мій додаток</title></head>
<head><title>Мій застосунок</title></head>

function PasswordField() {
const passwordHintId = useId();
console.log('Generated identifier:', passwordHintId)
console.log('Згенеруй ідентифікатор:', passwordHintId)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
console.log('Згенеруй ідентифікатор:', passwordHintId)
console.log('Згенерований ідентифікатор:', passwordHintId)

---
### Using the same ID prefix on the client and the server {/*using-the-same-id-prefix-on-the-client-and-the-server*/}
### Використання однакового ID префікса для клієнта та сервера {/*using-the-same-id-prefix-on-the-client-and-the-server*/}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
### Використання однакового ID префікса для клієнта та сервера {/*using-the-same-id-prefix-on-the-client-and-the-server*/}
### Використання однакового ID-префікса на клієнті та сервері {/*using-the-same-id-prefix-on-the-client-and-the-server*/}

### Використання однакового ID префікса для клієнта та сервера {/*using-the-same-id-prefix-on-the-client-and-the-server*/}
If you [render multiple independent React apps on the same page](#specifying-a-shared-prefix-for-all-generated-ids), and some of these apps are server-rendered, make sure that the `identifierPrefix` you pass to the [`hydrateRoot`](/reference/react-dom/client/hydrateRoot) call on the client side is the same as the `identifierPrefix` you pass to the [server APIs](/reference/react-dom/server) such as [`renderToPipeableStream`.](/reference/react-dom/server/renderToPipeableStream)
Якщо ви [рендерите декілька незалежних React застосунків на одній сторінці](#specifying-a-shared-prefix-for-all-generated-ids), і деякі з цих застосунків відрендерені сервером, запевниться, що `identifierPrefix`, який ви передаєте в [`hydrateRoot`](/reference/react-dom/client/hydrateRoot) викликається на клієнтській стороні, так само як `identifierPrefix`, який ви передаєте в [server APIs](/reference/react-dom/server), наприклад [`renderToPipeableStream`.](/reference/react-dom/server/renderToPipeableStream)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Якщо ви [рендерите декілька незалежних React застосунків на одній сторінці](#specifying-a-shared-prefix-for-all-generated-ids), і деякі з цих застосунків відрендерені сервером, запевниться, що `identifierPrefix`, який ви передаєте в [`hydrateRoot`](/reference/react-dom/client/hydrateRoot) викликається на клієнтській стороні, так само як `identifierPrefix`, який ви передаєте в [server APIs](/reference/react-dom/server), наприклад [`renderToPipeableStream`.](/reference/react-dom/server/renderToPipeableStream)
Якщо ви [рендерите декілька незалежних React-застосунків на одній сторінці](#specifying-a-shared-prefix-for-all-generated-ids), і деякі з цих застосунків відрендерені сервером, перевірте, що `identifierPrefix`, який ви передаєте до [`hydrateRoot`](/reference/react-dom/client/hydrateRoot) на клієнті, є тим самим `identifierPrefix`, який ви передаєте до [серверних API](/reference/react-dom/server), наприклад, [`renderToPipeableStream`.](/reference/react-dom/server/renderToPipeableStream)

```
You do not need to pass `identifierPrefix` if you only have one React app on the page.
Немає потреби передавати `identifierPrefix`, якщо ви маєте тільки один React застосунок на сторінці.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Немає потреби передавати `identifierPrefix`, якщо ви маєте тільки один React застосунок на сторінці.
Немає потреби передавати `identifierPrefix`, якщо ви маєте тільки один React-застосунок на сторінці.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants