Ever filled a form, refreshed by accident… and boom — everything gone? 😭
That moment costs real conversions.
React fix in 60 sec
If you’ve been burned by this before, comment SAVE 👇 #BuildInPublic#ReactJS#javascript30
useRef finally makes sense.
Used it to auto-focus the input in my Notes app.
One line:
inputRef.current.focus();
Refs = access DOM directly without re-rendering.
When did refs click for YOU? 👇 #BuildInPublic#ReactJS#javascript30
Just discovered custom hooks.
Me before: Copy-pasting 30 lines for every feature
Me after: useLocalStorage()
This is what power feels like.
When did custom hooks click for YOU? 👇
#BuildInPublic#ReactJS#javascript30
React interview question that made you say "bruh": Reply with the dumbest/hardest question you've been asked. I'll start:
"Explain the difference between useMemo and useCallback without looking it up"
#BuildInPublic#ReactJS#javascript30
useEffect is the most poorly taught hook in React. Here's ,
→ No array = runs every render (yes, EVERY)
→ Empty [] = runs once on mount
→ [dep] = runs when dep changes
→ Return function = cleanup (skip this and your app leaks memory) #BuildInPublic#ReactJS#javascript30
You can only use 3 React hooks forever.
Which 3 do you choose?
useState
useEffect
useContext
useRef
useMemo
useCallback
Custom hooks
#BuildInPublic#ReactJS#javascript30
Reply with your 3 👇
Built a stopwatch in React. mass proud. Memory leak. 3 hours of debugging. Turns out I forgot to clean up my useEffect. One line. That's all I was missing. mass humbling. If React still confuses you keep breaking stuff. That's how it clicks.#BuildInPublic#ReactJS#javascript30
it's day 3 of me creating 30 vanilla JavaScript projects for 30 days, just to be familiar with how things work under the hood. you can reach out if you want to be an accountability partner.
day 1 - drum kit
day 2 - js clock
day 3 - playing with css variables and js
#javascript30
✅ Day 2 of the #JavaScript30 challenge is complete!
Today, I built an analog clock using HTML, CSS, and Vanilla JavaScript 🕒
Revisited:
- Working with the Date object
- Using setInterval to update the UI in real-time
Join the challenge: javascript30.com