useReducer finally makes senseβ¦ because I built a project with it. π
React Quiz App + json-server fake API.
Hereβs what I learned π https://t.co/CUyqzMhl87
π₯οΈ Computer And Programming Timeline
70s β UNIX, C
80s β DOS, C++
90s β GUI, Java, Python
2000s β Web + XP
2010s β Mobile + AI
2020s β AI + Cloud
π 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
π 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
This bug wasted me hours π
Sharing so the next dev saves time.
If your React + Netlify site shows only a white screen,
π check _redirects and deploy settings first.
#React#Netlify#WebDev#Frontend