Skip to content

initial start and update the head of concurrent-mode-patterns.md #454

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

Closed
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 10 additions & 11 deletions content/docs/concurrent-mode-patterns.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,22 +15,21 @@ next: concurrent-mode-adoption.html

<div class="scary">

>Caution:
>
>This page was about experimental features that aren't yet available in a stable release. It was aimed at early adopters and people who are curious.
>
>Much of the information on this page is now outdated and exists only for archival purposes. **Please refer to the [React 18 Alpha announcement post](/blog/2021/06/08/the-plan-for-react-18.html
) for the up-to-date information.**
>
>Before React 18 is released, we will replace this page with stable documentation.
>تحذير:

كانت هذه الصفحة حول تجريب ميزات لم تتوفر في إصدار ثابت. كانت تستهدف المتبنين الأوائل والأشخاص الفضوليين.

الكثير من المعلومات الواردة في هذه الصفحة قديمة الآن ولا توجد إلا لأغراض الأرشفة. يرجى الرجوع إلى منشور إعلان React 18 Alpha announcement post **للحصول على أحدث المعلومات**.

قبل إصدار React 18 ، سنستبدل هذه الصفحة بوثائق ثابتة.

</div>

Usually, when we update the state, we expect to see changes on the screen immediately. This makes sense because we want to keep our app responsive to user input. However, there are cases where we might prefer to **defer an update from appearing on the screen**.
عادة ، عندما نقوم بتحديث الحالة ، نتوقع رؤية التغييرات على الشاشة على الفور. هذا منطقي لأننا نريد إبقاء تطبيقنا مستجيبًا لإدخالات المستخدم. ومع ذلك ، هناك حالات قد نفضل فيها ** تأجيل التحديث من الظهور على الشاشة **

For example, if we switch from one page to another, and none of the code or data for the next screen has loaded yet, it might be frustrating to immediately see a blank page with a loading indicator. We might prefer to stay longer on the previous screen. Implementing this pattern has historically been difficult in React. Concurrent Mode offers a new set of tools to do that.
على سبيل المثال ، إذا قمنا بالتبديل من صفحة إلى أخرى ، ولم يتم تحميل أي من التعليمات البرمجية أو البيانات للشاشة التالية بعد ، فقد يكون من المحبط رؤية صفحة فارغة تحتوي على مؤشر تحميل على الفور. قد نفضل البقاء لفترة أطول على الشاشة السابقة. كان تنفيذ هذا النمط صعبًا تاريخيًا في React. يوفر الوضع المتزامن مجموعة جديدة من الأدوات للقيام بذلك.

- [Transitions](#transitions)
- [Transitions](#transitions) انتقالات
- [Wrapping setState in a Transition](#wrapping-setstate-in-a-transition)
- [Adding a Pending Indicator](#adding-a-pending-indicator)
- [Reviewing the Changes](#reviewing-the-changes)
Expand Down