
Hi I am 22 year's old computer science engineer and I love programming...
Joined September 2022
- Tweets46
- Following144
- Followers7
- Likes73
Confusion to clarity useActionData hook from react router
dev.to/usama_dev/the-day-i-f…
1
15
useReducer finally makes sense… because I built a project with it. 😄
React Quiz App + json-server fake API.
Here’s what I learned 👇 dev.to/usama_dev/today-final…
1
2
25
🧠 Practicing React Rendering Today
&& for quick conditions
? : for inline UI logic
return null for clean exits
{isOpen && <p>Open 🚀</p>}
{numPizzas > 0 ? <Menu /> : <p>Soon 🍕</p>}
if (soldOut) return null;
Less code → Cleaner UI ⚡
#React #JavaScript #Frontend #WebDev
2
30
💡 Just learned about JavaScript’s Optional Chaining (?.) — a lifesaver for avoiding errors in nested objects.
const user = { contact: { email: "[email protected]" } };
console.log(user?.contact?.email); // ✅ "[email protected]"
console.log(user?.profile?.age); // ✅ undefined
24
Meta says the superpower of 2025’s top software engineers? Mastering one language that rules both front-end and back-end 🔑💻 #FullStack2025
1
24
🖥️ Computer And Programming Timeline
70s → UNIX, C
80s → DOS, C++
90s → GUI, Java, Python
2000s → Web + XP
2010s → Mobile + AI
2020s → AI + Cloud
29
Spread vs Rest in JS 🔥
Spread = expand/merge
Rest = collect leftovers
const car = { brand: "Toyota", color: "white" };
const newCar = { ...car, brand: "Tesla" };
// → { brand: "Tesla", color: "white" }
Quick. Powerful. Clean. 🚀
#JavaScript #WebDev #tasla
1
20
🔥 Object Destructuring
Extract values from objects in a clean way 👇
const bird = {
name: "sparrow",
coloured: { male: "white/brown" }
};
const { name, coloured: { male } } = bird;
console.log(name); // house sparrow
console.log(male); // white/brown
✅ Cleaner
✅ Easier
1
22
✨ Shorthand Property vs 🤖 Computed Property in #JavaScript
// Shorthand
let name = "Usama", age = 22;
const user = { name, age };
// Computed
let key = "email";
const user2 = { [key]: "[email protected]" };
👉 Cleaner, shorter, smarter code 🚀
#100DaysOfCode
1
2
26
🌍 JavaScript Scopes & Closures in 1 tweet:
Global 🌍 → everywhere
Function 🔧 → inside function
Block 🧱 → inside { }
Lexical 🧭 → depends on where written
Closure 🔒 → function + remembered scope
Master these → write cleaner JS 🚀
#JavaScript #100DaysOfCode
1
1
44
🔄 JavaScript for...x loops :
for (let i=0; i<3; i++) {} // counter loop
for (const i in arr) {} // keys / indexes
for (const v of arr) {} // values
⚡ Remember:
for → count
for...in → index
for...of → value
👉 Easy rule: in = index, of = values
1
19
💡 Pro tip: Always test locally before deploying:
npm run build
npx serve -s build
If it works locally, your code is fine → problem is Netlify config.
17
Fix ✅
1. Added _redirects file in public/:
/* /index.html 200
2. Checked Netlify settings:
Build command → npm run build
Publish dir → build
3. Cleared cache & redeployed.
13
👉 The issue wasn’t my code.
It was Netlify serving index.html instead of my JS bundle.
This happens often with React (SPA apps).
7
Just deployed my React app to Netlify…
Local build worked ✅
Netlify Preview worked ✅
But Production build? ❌ Just a white screen.
Console error:
Uncaught SyntaxError: Unexpected token '<'
Here’s how I fixed it 🧵
8
📄 input tag #webdeveloper #React
10


