Codecuriosity👨🏻💻 retweeted
Dr Atef Al Kahlout, director of the Indonesian Hospital in Gaza, expressed distress over the worsening conditions at the medical facility on Monday.
The hospital, which is located in the northern Gaza Strip, faces a critical shortage of fuel and medical supplies
Codecuriosity👨🏻💻 retweeted
Hundreds of Palestinians are waiting for long hours to get some potable water and bread during the ongoing aggression against Gaza Strip. 23.10.23
Codecuriosity👨🏻💻 retweeted
200k LinkedIn giveaway:
🔹 10 signed physical books
🔹 90 1-year subscriptions to the ByteBytego (digital version of SD vol1 and vol2)
To enter:
✅ Follow me on Twitter
✅ Like and RT
✅ Subscribe to our Youtube channel: bit.ly/3QsJcQM
⏰ Giveaway ends in 72 hours
Codecuriosity👨🏻💻 retweeted
💥 React tip: if you have an effect that needs to be executed when your app starts, it's definitely okay to execute it *outside* the component, and *not* in useEffect().
This is especially true if the effect should only execute once, which is an unavoidable constraint sometimes.
![// ❌ Don't put only-once effects in useEffect function App() { useEffect(() => { // Executing auth twice may cause errors authenticate(); // Fire-and-forget; no opportunity for cleanup }, []); return <main> {/* ... */} </main> } // ✅ Put only-once effects outside of components if (typeof window !== 'undefined') { authenticate(); } function App() { return <main> {/* ... */} </main> }](https://pbs.twimg.com/media/FUklhU_XEAA0M1O.jpg?name=small&format=webp)
ALT // ❌ Don't put only-once effects in useEffect function App() { useEffect(() => { // Executing auth twice may cause errors authenticate(); // Fire-and-forget; no opportunity for cleanup }, []); return <main> {/* ... */} </main> } // ✅ Put only-once effects outside of components if (typeof window !== 'undefined') { authenticate(); } function App() { return <main> {/* ... */} </main> }











