You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
-**`'syntax'`**: Only compile components and hooks that use Flow's [component](https://flow.org/en/docs/react/component-syntax/)and [hook](https://flow.org/en/docs/react/hook-syntax/) syntax.
45
+
-**`'syntax'`**: يُجمّع فقط المكوّنات والـ hooks التي تستخدم صياغة Flow لـ [component](https://flow.org/en/docs/react/component-syntax/)و[hook](https://flow.org/en/docs/react/hook-syntax/).
46
46
47
-
-**`'all'`**: Compile all top-level functions. Not recommended as it may compile non-React functions.
47
+
-**`'all'`**: يُجمّع كل الدوال على المستوى الأعلى. غير موصى به لأنه قد يُجمّع دوالاً ليست من React.
48
48
49
-
#### Caveats {/*caveats*/}
49
+
#### ملاحظات {/*caveats*/}
50
50
51
-
-The`'infer'`mode requires functions to follow React naming conventions to be detected
52
-
-Using`'all'`mode may negatively impact performance by compiling utility functions
53
-
-The`'syntax'`mode requires Flow and won't work with TypeScript
54
-
-Regardless of mode, functions with `"use no memo"`directive are always skipped
51
+
-وضع`'infer'`يتطلّب تسمية تتبع اصطلاحات React ليُكتشف المكوّن
52
+
-وضع`'all'`قد يضرّ بالأداء بتجميع دوال مساعدة
53
+
-وضع`'syntax'`يتطلّب Flow ولا يعمل مع TypeScript
54
+
-بغض النظر عن الوضع، الدوال التي تحتوي `"use no memo"`تُستبعد دائماً
### 2. Configure the target version {/*configure-target-version*/}
62
+
### 2. ضبط إصدار الاستهداف {/*configure-target-version*/}
63
63
64
-
Set the minimum React version your library supports:
64
+
عيّن أقل إصدار React تدعمه المكتبة:
65
65
66
66
```js
67
67
{
68
-
target:'17', //Minimum supported React version
68
+
target:'17', //أقل إصدار React مدعوم
69
69
}
70
70
```
71
71
72
-
## Testing Strategy {/*testing-strategy*/}
72
+
## استراتيجية الاختبار {/*testing-strategy*/}
73
73
74
-
Test your library both with and without compilation to ensure compatibility. Run your existing test suite against the compiled code, and also create a separate test configuration that bypasses the compiler. This helps catch any issues that might arise from the compilation process and ensures your library works correctly in all scenarios.
74
+
اختبر مكتبتك مع التجميع وبدونه لضمان التوافق. شغّل مجموعة الاختبارات الحالية على الشيفرة المُجمَّعة، وأنشئ إعداد اختبار منفصلاً يتخطّى المُصرّف. يساعد ذلك على اكتشاف مشاكل قد تنشأ عن التجميع ويضمن عمل المكتبة في كل السيناريوهات.
75
75
76
-
## Troubleshooting {/*troubleshooting*/}
76
+
## استكشاف الأعطال {/*troubleshooting*/}
77
77
78
-
### Library doesn't work with older React versions {/*library-doesnt-work-with-older-react-versions*/}
78
+
### المكتبة لا تعمل مع React أقدم {/*library-doesnt-work-with-older-react-versions*/}
79
79
80
-
If your compiled library throws errors in React 17 or 18:
80
+
إذا رمت المكتبة المُجمَّعة أخطاء في React 17 أو 18:
81
81
82
-
1.Verify you've installed`react-compiler-runtime`as a dependency
83
-
2.Check that your`target`configuration matches your minimum supported React version
84
-
3.Ensure the runtime package is included in your published bundle
82
+
1.تحقق من تثبيت`react-compiler-runtime`كتبعية
83
+
2.تأكد أن إعداد`target`يطابق أقل إصدار React تدعمه
84
+
3.تأكد من تضمين حزمة التشغيل في الحزمة المنشورة
85
85
86
-
### Compilation conflicts with other Babel plugins {/*compilation-conflicts-with-other-babel-plugins*/}
86
+
### تعارض التجميع مع إضافات Babel أخرى {/*compilation-conflicts-with-other-babel-plugins*/}
87
87
88
-
Some Babel plugins may conflict with React Compiler:
88
+
قد تتعارض بعض إضافات Babel مع React Compiler:
89
89
90
-
1.Place`babel-plugin-react-compiler`early in your plugin list
91
-
2.Disable conflicting optimizations in other plugins
92
-
3.Test your build output thoroughly
90
+
1.ضع`babel-plugin-react-compiler`مبكراً في قائمة الإضافات
91
+
2.عطّل تحسينات متعارضة في إضافات أخرى
92
+
3.اختبر مخرجات البناء بدقة
93
93
94
-
### Runtime module not found {/*runtime-module-not-found*/}
94
+
### وحدة التشغيل غير موجودة {/*runtime-module-not-found*/}
95
95
96
-
If users see "Cannot find module 'react-compiler-runtime'":
96
+
إذا رأى المستخدمون «Cannot find module 'react-compiler-runtime'»:
97
97
98
-
1.Ensure the runtime is listed in `dependencies`, not`devDependencies`
99
-
2.Check that your bundler includes the runtime in the output
100
-
3.Verify the package is published to npm with your library
98
+
1.تأكد أن التشغيل في `dependencies` وليس`devDependencies`
99
+
2.تحقق أن المُجمّع يضمّن التشغيل في المخرجات
100
+
3.تأكد أن الحزمة منشورة على npm مع مكتبتك
101
101
102
-
## Next Steps {/*next-steps*/}
102
+
## الخطوات التالية {/*next-steps*/}
103
103
104
-
-Learn about [debugging techniques](/learn/react-compiler/debugging)for compiled code
105
-
-Check the [configuration options](/reference/react-compiler/configuration)for all compiler options
0 commit comments