Skip to content

Conversation

@Andrii256
Copy link

Translate useEffect section to Ukrainian language

@vercel
Copy link

vercel bot commented Dec 4, 2025

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

1 Skipped Deployment
Project Deployment Review Updated (UTC)
uk-legacy-reactjs-org Ignored Ignored Preview Dec 22, 2025 9:12pm

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!

Це перша частина перевірки. Було перевірено загалом деякі слововживання чи правила.
Запити на зміни мають бути виправлені і перевірені у всій статті (та іншій статті про useEffectEvent) до того, як я почну вичитувати текст у наступних частинах перевірки, щоб зменшити кількість когнітивного навантаження від коректури та редактури того самого. Немає вимог, коли має бути виправлено, це буде просто послідовна асинхронна взаємодія перевірка-зміни-перевірка-зміни-перевірка тощо. Також через те, що я перевіряю одна і у мене майже немає часу, то довгі статті зливаються, на жаль, дуже довго.


### `useEffect(setup, dependencies?)` {/*useeffect*/}

Call `useEffect` at the top level of your component to declare an Effect:
Щоб оголосити Ефект, на верхньому рівні компонента викличте `useEffect`.
Copy link
Collaborator

Choose a reason for hiding this comment

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

тут і далі

  • перекладати завжди Effect як ефект, Hook як хук
  • завжди писати з малої

Copy link
Author

Choose a reason for hiding this comment

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

прийняв, перероблю. Але не пам'ятаю де саме, але десь в інструкціях писалось, що Хуки, Ефекти та інше називати з великої букви

* `setup`: The function with your Effect's logic. Your setup function may also optionally return a *cleanup* function. When your component is added to the DOM, React will run your setup function. After every re-render with changed dependencies, React will first run the cleanup function (if you provided it) with the old values, and then run your setup function with the new values. After your component is removed from the DOM, React will run your cleanup function.

* **optional** `dependencies`: The list of all reactive values referenced inside of the `setup` code. Reactive values include props, state, and all the variables and functions declared directly inside your component body. If your linter is [configured for React](/learn/editor-setup#linting), it will verify that every reactive value is correctly specified as a dependency. The list of dependencies must have a constant number of items and be written inline like `[dep1, dep2, dep3]`. React will compare each dependency with its previous value using the [`Object.is`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is) comparison. If you omit this argument, your Effect will re-run after every re-render of the component. [See the difference between passing an array of dependencies, an empty array, and no dependencies at all.](#examples-dependencies)
* `setup` (з англ. встановлюючий): Функція з логікою вашого Ефекту. Ваша функція `setup` може додатково повертати *cleanup* функцію (з англ. cleanup - прибирання). Після того, як ваш компонент буде додано в DOM, React виконає функцію `setup`. Потім після кожного наступного рендеру React буде перевіряти чи змінилось значення хоча б однієї із залежностей, і якщо значення хоча б однієї залежності змінилось, то React спочатку виконає *cleanup*-функцію (якщо ви її надали) зі старими значеннями, а потім знову виконає `setup` функцію із новими значеннями. Після видалення компонента з DOM React виконає *cleanup*-функцію.
Copy link
Collaborator

Choose a reason for hiding this comment

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

Copy link
Author

@Andrii256 Andrii256 Dec 22, 2025

Choose a reason for hiding this comment

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

тут і далі виправити небажане використання дієприкметників на уюч аяч

якщо це принципово, то поміняю. Але я не згоден з зауваженням, і з суттю issue теж.

Те, що дієприкметники на уюч аяч згідно думки когось (ще невідомо кого), хто писав ту нотатку до авточекера, "менш характерна для української мови порівняно з російською", ще не означає, що вони не бажані.

В багатьох місцях написати одним дієприкметником набагато краще, зручніше (в першу чергу для людини, що читає), чим "той, що встановлює".

Copy link
Author

Choose a reason for hiding this comment

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

прикладки виправив


* `setup`: The function with your Effect's logic. Your setup function may also optionally return a *cleanup* function. When your component is added to the DOM, React will run your setup function. After every re-render with changed dependencies, React will first run the cleanup function (if you provided it) with the old values, and then run your setup function with the new values. After your component is removed from the DOM, React will run your cleanup function.

Copy link
Collaborator

Choose a reason for hiding this comment

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

  • параграфи і відступи мають збігатися з параграфами і відступами в українській версії, повернути порядок. включно з відступами у коді

Copy link
Author

@Andrii256 Andrii256 Dec 22, 2025

Choose a reason for hiding this comment

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

Image Image

Це баг гітхаба / гіта.
В тексті порядок дотриманий.


Some components need to stay connected to the network, some browser API, or a third-party library, while they are displayed on the page. These systems aren't controlled by React, so they are called *external.*
Деякі компоненти мають залишатися підключеними до мережі, до деякого **API браузера** або до **сторонньої бібліотеки**, доки вони відображаються на сторінці. Ці системи не контролюються React, тому вони називаються **зовнішніми**.
Copy link
Collaborator

Choose a reason for hiding this comment

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

підключення та однорідні стилістино не рекомендовані. замінити тут і далі на під'єднання (аналогічно відключення на від'єднання)

Copy link
Author

@Andrii256 Andrii256 Dec 22, 2025

Choose a reason for hiding this comment

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

не рекомендовані ким і чому?)

підключати є не лише в російській, а й в польській. Це українські колоністи принесли с собою на схід слов'янське слово ключ і підключати, а не навпаки.

Кенселити слово просто тому, що росіяни теж його використовують - це як кенсилити борщ, кисень, електрику і що там ще росіяни використовують. Я категорично проти цього

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