Що таке SETSTATE Англійською - Англійська переклад

Іменник

Приклади вживання Setstate Українська мовою та їх переклад на Англійською

{-}
  • Colloquial category close
  • Ecclesiastic category close
  • Computer category close
SetState(), щоб змінити її.
SetState() to change it.
Дізнатись більше про setState.
Learn more about setState.
Чому setState видає невірне значення?
Why is setState giving me the wrong value?
Length як частину аргументу this. setState.
Length as part of the this. setState argument.
Їх всього два: setState() і forceUpdate().
There are just two of them: setState() and forceUpdate().
Функція setState використовується для оновлення стану.
The setState function is used to update the state.
Є три речі, які ви повинні знати про setState().
There are three things you should know about setState().
SetState() не завжди відразу оновлює компонент.
SetState() does not always immediately update the component.
Викликають setState, коли у джерелі даних відбуваються зміни.
Call setState whenever the data source changes.
SetState у класі, який об'єднує оновлені поля в об'єкт.
SetState in a class, which merges the updated fields into the object.
У всіх інших методах для цього слід використовувати this. setState().
In all other methods, you need to use this. setState() instead.
SetState у класах, за винятком того, що не об'єднує новий та старий стан.
SetState in a class, except it doesn't merge the old and new state together.
Функції-оновлювачі стану компонента, що передаються першим аргументом в setState.
State updater functions(the first argument to setState).
Ви можете передати в setState() першим аргументом об'єкт, а не функцію:.
You may optionally pass an object as the first argument to setState() instead of a function:.
Щоб виправити це, ми можемо використати функціональну форму оновлення setState.
To fix this, we can use the functional update form of setState.
SetState() з новим введеним значенням і поточною шкалою вводу, яку ми щойно редагували.
SetState() with the new input value and the current scale of the input we just edited.
У чому полягає різниця між передачею об'єкта або функції у setState?
What is the difference between passing an object or a function in setState?
Він буде використовувати this. setState() для планування оновлення внутрішнього стану компонента:.
It will use this. setState() to schedule updates to the component local state:.
Ось приклад компонента лічильника, що використовує обидві форми setState:.
Here's an example of a counter component that uses both forms of setState:.
Щоб виправити це, скористайтеся другою формою setState(), яка приймає функцію, а не об'єкт.
To fix it, use a second form of setState() that accepts a function rather than an object.
Props і nextProps в цьому методі та виконати переходи стану, використовуючи this. setState().
Props and nextProps and perform state transitions using this. setState() in this method.
Думайте про setState() як про запит, а не як про команду, що має бути негайно виконана для оновлення компонента.
Think of setState() as a request rather than an immediate command to update the component.
Якщо наступний стан обчислюється з використанням попереднього,ви можете передати функцію до setState.
If the new state is computed using the previous state,you can pass a function to setState.
Інакше React вважатиме, що не може отримати доступ до DOM,і такі методи, як setState не будуть працювати.
Otherwise React will think it can't access the DOM andmethods like setState won't work.
На відміну від методу setState у класових компонентах, useState не об'єднує оновлювані об'єкти автоматично.
Unlike the setState method found in class components, useState does not automatically merge update objects.
SetState() ставить в чергу оновлення стану компонента і повідомляє React, що цей компонент і його нащадки мають бути повторно відрендерені з оновленим станом.
SetState() enqueues changes to the component state and tells React that this component and its children need to be re-rendered with the updated state.
Ця форма запису setState() також асинхронна і кілька викликів впродовж одного циклу можуть бути згруповані в один.
This form of setState() is also asynchronous, and multiple calls during the same cycle may be batched together.
SetState з обробника onClick у методі render компонента Square, ми наказуємо React перерендерити компонент щоразу під час натиску на <button>. Після оновлення, this. state.
SetState from an onClick handler in the Square's render method, we tell React to re-render that Square whenever its<button> is clicked. After the update, the Square's this. state.
Крім того, оскільки setState() автоматично об'єднує частковий стан у поточний стан, нам потрібно було лише викликати його зі зміненими частинами.
Also, since setState() automatically merges a partial state into the current state, we only needed to call it with the changed parts.
Другий параметр setState()- це необов'язкова функція зворотнього виклику, яка буде виконана після того, як setState завершив роботу і компонент повторно відрендерився.
The second parameter to setState() is an optional callback function that will be executed once setState is completed and the component is re-rendered.
Результати: 60, Час: 0.0157

Найпопулярніші словникові запити

Українська - Англійська