The project’s still in progress, but I’m proud of every step forward 🚀
x.com/abhishekgo49...
The project’s still in progress, but I’m proud of every step forward 🚀
x.com/abhishekgo49...
Practiced:
• Clean React component structure
• CSS styling for a modern look
• Prepping to connect TMDb API soon 🔗
Practiced:
• Clean React component structure
• CSS styling for a modern look
• Prepping to connect TMDb API soon 🔗
Weather data is fetching successfully, but UI integration is still in progress 🌡️💨
Not done yet, but learning is solid and confidence is growing 💪
One bug. One fix. One day at a time ✨
x.com/abhishekgo49...
Weather data is fetching successfully, but UI integration is still in progress 🌡️💨
Not done yet, but learning is solid and confidence is growing 💪
One bug. One fix. One day at a time ✨
x.com/abhishekgo49...
✍️ Handling input with useState
🖱️ Triggering API calls using onClick
🔗 Using template literals for dynamic API URLs
🐞 Debugging API errors step by step
✍️ Handling input with useState
🖱️ Triggering API calls using onClick
🔗 Using template literals for dynamic API URLs
🐞 Debugging API errors step by step
Practised fetching data from an API and rendering it safely with the user.[0]?.name
Today’s takeaway:
React looks simple when you read it, but it reveals its smart layers only when you break something,
Small bugs, big lesson.
x.com/abhishekgo49...
Practised fetching data from an API and rendering it safely with the user.[0]?.name
Today’s takeaway:
React looks simple when you read it, but it reveals its smart layers only when you break something,
Small bugs, big lesson.
x.com/abhishekgo49...
I learned how to:
• call an API on mount
• store the response in state
• render it dynamically
• avoid infinite loops
• understand how React re-renders when state changes
Seeing data appear on the UI in real time.
I learned how to:
• call an API on mount
• store the response in state
• render it dynamically
• avoid infinite loops
• understand how React re-renders when state changes
Seeing data appear on the UI in real time.
Live Clock App 🕒
I built a simple Clock App that updates every second — and in the process, I finally understood how useEffect really works.
x.com/abhishekgo49...
Live Clock App 🕒
I built a simple Clock App that updates every second — and in the process, I finally understood how useEffect really works.
x.com/abhishekgo49...
setState → re-render → React checks dependencies → maybe re-run effect.
Understand this cycle, and useEffect stops being confusing magic.
setState → re-render → React checks dependencies → maybe re-run effect.
Understand this cycle, and useEffect stops being confusing magic.
If your effect depends on count and updates count,
it re-renders forever.
That’s because the dependency keeps changing — so the effect never stops.
If your effect depends on count and updates count,
it re-renders forever.
That’s because the dependency keeps changing — so the effect never stops.
Every time you call setState, React re-renders → then checks dependencies → and decides whether to re-run your effect.
That’s the core logic loop.
Every time you call setState, React re-renders → then checks dependencies → and decides whether to re-run your effect.
That’s the core logic loop.
It runs after React finishes rendering your UI.
Timing depends on the dependency array:
[] → runs once on mount
[count] → runs whenever count changes
It runs after React finishes rendering your UI.
Timing depends on the dependency array:
[] → runs once on mount
[count] → runs whenever count changes
x.com/abhishekgo49...
x.com/abhishekgo49...
And event.target.value is literally the latest character you just typed.
Simple… but powerful.
And event.target.value is literally the latest character you just typed.
Simple… but powerful.
@abhishekgo49196
·
Dec 9
Some parts are still foggy, and that’s okay.
I’ll revisit, rebuild, and make it sharp.
Consistency > confidence.
Day 10 loading… 🚀
x.com/abhishekgo49...
@abhishekgo49196
·
Dec 9
Some parts are still foggy, and that’s okay.
I’ll revisit, rebuild, and make it sharp.
Consistency > confidence.
Day 10 loading… 🚀
x.com/abhishekgo49...
• Controlled inputs
• Correct array state updates
• map() for UI
• Why direct state mutation breaks apps
Also learned that confusion is not failure, it’s the doorway 🚪
x.com/abhishekgo49...
• Controlled inputs
• Correct array state updates
• map() for UI
• Why direct state mutation breaks apps
Also learned that confusion is not failure, it’s the doorway 🚪
x.com/abhishekgo49...
React is becoming clearer bit by bit.
Excited for tomorrow’s concept! 🚀
x.com/abhishekgo49...
React is becoming clearer bit by bit.
Excited for tomorrow’s concept! 🚀
x.com/abhishekgo49...
• State gives components memory 🧠
• Always use the setter to update state 🔄 (direct variables won’t re-render UI)
• Use previous state when needed: setCount(prev => prev + 1) ⏮️
• Event handlers need careful parameter passing ⚠️
x.com/abhishekgo49...
• State gives components memory 🧠
• Always use the setter to update state 🔄 (direct variables won’t re-render UI)
• Use previous state when needed: setCount(prev => prev + 1) ⏮️
• Event handlers need careful parameter passing ⚠️
x.com/abhishekgo49...