-
Notifications
You must be signed in to change notification settings - Fork 126
docs(uk): translate useEffect.md to Ukrainian #641
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?
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. 1 Skipped Deployment
|
alinkedd
left a comment
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!
Це перша частина перевірки. Було перевірено загалом деякі слововживання чи правила.
Запити на зміни мають бути виправлені і перевірені у всій статті (та іншій статті про useEffectEvent) до того, як я почну вичитувати текст у наступних частинах перевірки, щоб зменшити кількість когнітивного навантаження від коректури та редактури того самого. Немає вимог, коли має бути виправлено, це буде просто послідовна асинхронна взаємодія перевірка-зміни-перевірка-зміни-перевірка тощо. Також через те, що я перевіряю одна і у мене майже немає часу, то довгі статті зливаються, на жаль, дуже довго.
|
|
||
| ### `useEffect(setup, dependencies?)` {/*useeffect*/} | ||
|
|
||
| Call `useEffect` at the top level of your component to declare an Effect: | ||
| Щоб оголосити Ефект, на верхньому рівні компонента викличте `useEffect`. |
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.
тут і далі
- перекладати завжди Effect як ефект, Hook як хук
- завжди писати з малої
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.
прийняв, перероблю. Але не пам'ятаю де саме, але десь в інструкціях писалось, що Хуки, Ефекти та інше називати з великої букви
| * `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*-функцію. |
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.
- тут і далі виправити небажане використання дієприкметників на уюч аяч Морфологія: активні дієприкметники теперішнього часу (існуючий, працюючий) #501
- тут і далі розібратися з написанням прикладок (React-компонент або компонент React, але не
React компонент) - як тире використовувати саме тире, не дефіс
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.
тут і далі виправити небажане використання дієприкметників на уюч аяч
якщо це принципово, то поміняю. Але я не згоден з зауваженням, і з суттю issue теж.
Те, що дієприкметники на уюч аяч згідно думки когось (ще невідомо кого), хто писав ту нотатку до авточекера, "менш характерна для української мови порівняно з російською", ще не означає, що вони не бажані.
В багатьох місцях написати одним дієприкметником набагато краще, зручніше (в першу чергу для людини, що читає), чим "той, що встановлює".
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.
прикладки виправив
|
|
||
| * `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. | ||
|
|
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.
|
|
||
| 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, тому вони називаються **зовнішніми**. |
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.
не рекомендовані ким і чому?)
підключати є не лише в російській, а й в польській. Це українські колоністи принесли с собою на схід слов'янське слово ключ і підключати, а не навпаки.
Кенселити слово просто тому, що росіяни теж його використовують - це як кенсилити борщ, кисень, електрику і що там ще росіяни використовують. Я категорично проти цього


Translate useEffect section to Ukrainian language