React.js Notes
372 subscribers
72 photos
4 files
48 links
Welcome :)
Public React Notes
Download Telegram
🔥1
في حاجه جميلة اوي لسا مكتشقها في js
حته كدا. هتحل مشكله اسمها race condition
لما تعمل fetch
ف زي مايكون الداتا بتسابق بعضها مين يوصل الاول ودا بيعمل مشكله
🥰1
ف بتعمل دي الاول
تاني حاجه
تضيف دي تاني ارجيومينت ل فيتش فانكشن
و AbortController دي بتأثر عل البروزر وبس
ملهاش دعوه ب فريم وركس خالص
لانها Browser API يعني
تالت حاجه. ريتيرن فانكشن تعمل abort
ودي بيبق اسمها CleanUp function
بعد كل كدا. في ايرور بيظهر
The user aborted a request
ف اعمله ايرور هاندلينج
if (error.name === "AbortError") return;
4 React UI Components Libraries You Should Be Using

Tremor - https://www.tremor.so/components
Radix-UI - https://www.radix-ui.com/
ShadCN - https://ui.shadcn.com
Next UI - https://nextui.org/
2🥰1
A very great feature in optional chaining.
Naturally, it is for objects. Check if this property exists or not.
But there is something that will benefit you.
It works with function as well
Like this
callback?.()

If this callback function exists? It will be implemented.
If it is not there. Nothing will happen

Here you will need it when you create a custom hook and pass a function to it as another parameter

and take a look at #rules_of_hooks
https://react.dev/reference/rules/rules-of-hooks
🔥31
https://overreacted.io/
Some articles about React.
and the most famous questions about it
🔥1🥰1
🥰2🔥1
⭐️Methodology of how useReducer work⭐️
🔥1🥰1