-
Notifications
You must be signed in to change notification settings - Fork 390
add translated flushSync #1021
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?
add translated flushSync #1021
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎ 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.
спасибо за перевод! оставил один комментарий на подумать
@@ -122,12 +122,12 @@ export default function PrintApp() { | |||
|
|||
</Sandpack> | |||
|
|||
Without `flushSync`, the print dialog will display `isPrinting` as "no". This is because React batches the updates asynchronously and the print dialog is displayed before the state is updated. | |||
Без `flushSync` диалог печати будет показывать `isPrinting` как "no". Это происходит потому, что 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.
Без `flushSync` диалог печати будет показывать `isPrinting` как "no". Это происходит потому, что React группирует обновления асинхронно, и диалог печати отображается до обновления состояния. | |
Без `flushSync` диалог печати будет показывать `isPrinting` как "нет". Это происходит потому, что React группирует обновления асинхронно, и диалог печати отображается до обновления состояния. |
здесь отсылка к переведённому примеру
* `flushSync` may run pending Effects and synchronously apply any updates they contain before returning. | ||
* `flushSync` may flush updates outside the callback when necessary to flush the updates inside the callback. For example, if there are pending updates from a click, React may flush those before flushing the updates inside the callback. | ||
* `flushSync` может значительно ухудшить производительность. Используйте его с осторожностью. | ||
* `flushSync` может заставить ожидающие границы Suspense показать состояние `fallback`. |
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.
тут можно перевести и Suspense
, и fallback
(как было выше в переводе сделано)
для обоих терминов у нас есть согласованный перевод в правилах:
Suspense - задержка
fallback - запасной
либо уточнить, что речь идёт про компонент и его проп соответственно
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.
ещё может быть вместо "границы" использовать "условия"? Как-будто чуть более понятно должно быть.
No description provided.