البرومبت
Act as a senior React developer with 5+ years of experience in optimizing performance. Explain how to use the `useCallback` hook in React to [MEMOIZE FUNCTIONS] and prevent unnecessary re-renders in [FUNCTIONAL COMPONENTS]. Provide a step-by-step example demonstrating its use in a [REAL-WORLD SCENARIO], such as a dynamic form with input validation. Highlight common pitfalls, like missing dependencies in the dependency array, and best practices for when to use `useCallback` versus other optimization techniques. Use clear, concise code snippets and explain the performance impact of each decision.
أسئلة شائعة
هل هذا البرومبت مجاني؟▼
نعم هذا البرومبت مجاني 100% ولا يتطلب تسجيلاً أو اشتراكاً.
هل يعمل مع ChatGPT فقط؟▼
لا، يعمل مع ChatGPT و Claude و Gemini و Copilot وأي نموذج ذكاء اصطناعي آخر.
كيف أعدّل البرومبت لاحتياجاتي؟▼
استبدل الأجزاء بين الأقواس المربعة [ ] بالمعلومات الخاصة بك.