โ๏ธ Day 34 #100DaysOfCode #React has 2 phases
1๏ธโฃ Render Phase = calculate UI
React runs your component + pure hooks
Builds + diffs the virtual DOM
โ No DOM, no effects
2๏ธโฃ Commit Phase = apply UI
React updates the DOM, then runs:
โก๏ธ useLayoutEffect (before paint)
โก๏ธ useEffect (after paint)
#frontend
13.11.2025 05:58 โ ๐ 3 ๐ 0 ๐ฌ 0 ๐ 0
โ๏ธ Day 33 #100DaysOfCode #React useLayoutEffect
Reactโs render cycle ๐
useLayoutEffect โ paint โuseEffect
๐ง useEffect:
Non-visual side effects, things the user won't see: data, timers, logging
๐จ useLayoutEffect:
Visual sync, things that affect whatโs painted: size, position, layout
12.11.2025 02:31 โ ๐ 9 ๐ 0 ๐ฌ 0 ๐ 0
โ๏ธ Day 32 #100DaysOfCode #React useDebounce
Typing triggers onChange instantly โก๏ธ
But you donโt always want instant reactions, like spamming an API with every keystroke.
๐ก Debounce = โwait until the user stops doing something.โ
๐ข useDebounce slows down chaos โ creates calm
#frontenddevelopers
08.11.2025 01:33 โ ๐ 3 ๐ 0 ๐ฌ 0 ๐ 0
โ๏ธ Day 31 #100DaysOfCode #React useState vs derive data
๐ก Rule of thumb
โ
can be recalculated from props or other state โ derive it
โ๏ธ depends on user input or async data โ store it
๐ง โIf you can derive it, donโt store it.โ
#frontenddevelopers
07.11.2025 01:03 โ ๐ 6 ๐ 0 ๐ฌ 0 ๐ 0
Cool, so each slice has its own actions to manage state changes, and the reducer just combines them back into the store?
07.11.2025 00:53 โ ๐ 1 ๐ 0 ๐ฌ 1 ๐ 0
how are slices used in your app?
06.11.2025 03:01 โ ๐ 1 ๐ 0 ๐ฌ 1 ๐ 0
that's way more fun than a rubber duck :3
06.11.2025 03:00 โ ๐ 1 ๐ 0 ๐ฌ 1 ๐ 0
Day 30 #100DaysOfCode #React.memo
React.memo tells React:
โIf the props didnโt change, skip re-rendering this component.โ
When the parent re-renders
๐ง React checks: did props change?
โ
If no โ reuse the last rendered output
โ If yes โ re-render normally
watch demo with ๐
#frontend
06.11.2025 02:49 โ ๐ 5 ๐ 0 ๐ฌ 0 ๐ 0
โ๏ธ Day 29 #100DaysOfCode #React useMemo?
useMemo stops unnecessary recalculations when inputs havenโt changed
โ
Caches the last computed value
โ
Reuses it if deps stay the same
โ
Prevents re-creating arrays/objects that trigger re-renders
Watch the demo ๐ with sound on ๐
#frontend
05.11.2025 01:47 โ ๐ 6 ๐ 0 ๐ฌ 0 ๐ 0
โ๏ธ Day 28 #100DaysOfCode #React usePrevious
React re-renders, use ๐ง usePrevious to remember the last renderโs value
โ
Stores the last committed value
โ
Doesnโt cause extra renders
โ
Built on useRef + useEffect timing (runs after paint)
๐กReact values are snapshots per render
#frontend #usePrevious
04.11.2025 01:42 โ ๐ 4 ๐ 0 ๐ฌ 0 ๐ 0
Which one of the usePrevious hook solutions is the idiomatic solution?
Approach 1: useState
Approach 2: useRef
#React #greatfrontend #usePrevious
04.11.2025 01:21 โ ๐ 0 ๐ 0 ๐ฌ 0 ๐ 0
โ๏ธ Day 27 #100DaysOfCode #React useReducer
When your state logic starts branching, use useReducer โ keeps updates centralized & predictable:
โ
Puts all state transitions in one place
โ
Easier to test & debug centralized
โ
Pairs great with Context
#FrontendDev
03.11.2025 00:42 โ ๐ 4 ๐ 0 ๐ฌ 0 ๐ 0
what are you working on? love to see what you're building
01.11.2025 02:30 โ ๐ 1 ๐ 0 ๐ฌ 0 ๐ 0
โ๏ธ Day 26 #100DaysOfCode forms in #React:
1โฃControlled = value in state โ predictable UI, validation, derived rules
2โฃUncontrolled = DOM owns value (via ref) โ minimal rerenders, large forms/3rd-party
๐Rule of thumb: default to controlled; use uncontrolled when only read on submit or need perf
01.11.2025 02:21 โ ๐ 3 ๐ 0 ๐ฌ 0 ๐ 0
Entrepreneurs Challenge ๐ Cofounder Application
Current application demo: https://x.com/linzhangcs/status/1982898774851891608 Once accepted, the Entrepreneurs Challenge program provides how-to workshops, hands-on boot camps, 1:1 coachingโall design...
@buildinginpublic.bsky.social
Looking for a cofounder for $75,000 funding! ๐
apply here๐ forms.gle/hFLpb5mTMtf1...
Building an adaptive productivity app, DM if you want to know more
Iโm product + frontend (Next.js/React/AI)
You: biz ops, community building, or backend/AI mind ๐ฟ
31.10.2025 19:17 โ ๐ 2 ๐ 0 ๐ฌ 0 ๐ 0
nice layout
30.10.2025 23:52 โ ๐ 0 ๐ 0 ๐ฌ 0 ๐ 0
โ๏ธ Day 25 #100DaysOfCode React State Debug
You console.log state right after setState inside your handler to see the change, and it's still the old value? ๐ค
โ
ways to confirm the update:
๐ Show it directly in the UI
๐ Log it inside a useEffect that depends on that state
#React #frontend
30.10.2025 21:58 โ ๐ 3 ๐ 0 ๐ฌ 0 ๐ 0
Just saw this, I guess you like EmberJS? I have not used it. I will check it out.
30.10.2025 21:15 โ ๐ 2 ๐ 0 ๐ฌ 1 ๐ 0
It's good that you have a clear preference. I don't know if I like React. It has the largest support system, that is all.
What's your favorite frontend library/framework?
30.10.2025 21:06 โ ๐ 0 ๐ 0 ๐ฌ 0 ๐ 0
Day 24 #100DaysOfCode #React Batching
React doesnโt update state right away
๐งฉ It batches multiple updatesโ runs one render โ one DOM commit
setState feels delayed because React:
๐Defers updates until the current function exits
๐Avoids extra re-renders
๐Updates the DOM after reconciling all changes
29.10.2025 22:08 โ ๐ 5 ๐ 0 ๐ฌ 0 ๐ 0
Thatโs where React really shines. It takes care of the messy DOM updates for you and keeps the UI declaratively tied to your data, so you can focus on what the UI should look like, not how to update it every time something changes.
29.10.2025 21:44 โ ๐ 0 ๐ 0 ๐ฌ 1 ๐ 0
Youโre right that JavaScript already gives you solid tools for managing data and behavior.
The tricky part, especially as apps got bigger, wasnโt managing the state itself. It was keeping the UI in sync with that state. DOM API doesn't have a built-in way to automatically reflect those state changes
29.10.2025 21:44 โ ๐ 0 ๐ 0 ๐ฌ 1 ๐ 0
Day 23 #100DaysOfCode Why React rerenders ๐ง
React rerenders when reactive data changes:
state or props.
Too many re-renders? โก
Issue with non-UI data in useState.
๐น Use useState for UI: state and props
๐น Use useRef for internal tracking: timers, previous values, or DOM refs
#react #frontend
29.10.2025 01:25 โ ๐ 7 ๐ 0 ๐ฌ 1 ๐ 0
Day 22 #100DaysOfCode React useState vs useRef
In React, the real mental unlock is this:
๐งฉ Reactive data vs Non-reactive data
useState โ triggers re-render when changed
useRef โ persists data, but React doesnโt care
codesandbox.io/p/sandbox/4y...
#frontend #react
28.10.2025 01:48 โ ๐ 4 ๐ 0 ๐ฌ 0 ๐ 0
Wow, that's amazing. Keep us updated!
27.10.2025 19:44 โ ๐ 1 ๐ 0 ๐ฌ 0 ๐ 0
Iโm learning JavaScript because I want to become an engineer and build my own products. Itโs not easy! Iโve been learning and using it for the past 7โ8 years, and it takes time!
27.10.2025 19:43 โ ๐ 1 ๐ 0 ๐ฌ 1 ๐ 0
That's awesome! I will check out his channel. Iโve not watched live coding videos before, but they sound like a great complement to the book.
27.10.2025 19:38 โ ๐ 1 ๐ 0 ๐ฌ 0 ๐ 0
cool, good to know. It's looking great!
27.10.2025 19:33 โ ๐ 1 ๐ 0 ๐ฌ 0 ๐ 0
Nice! I just got a copy of Eloquent JavaScript, too. How do you like it?
23.10.2025 22:37 โ ๐ 1 ๐ 0 ๐ฌ 1 ๐ 0
lol, that's fun!
What's ISS watcher?
23.10.2025 22:35 โ ๐ 0 ๐ 0 ๐ฌ 1 ๐ 0
I am a passionate software developer specialized in Ember.js & JavaScript. I dabble in Photography, 360 panoramic tours, interactive fiction, and geek culture. https://tritarget.org/
๐ป #100Devs || #100DaysOfCode
๐ฎ Xbox || Rog Ally || PS5 || Switch
๐ Phoenix Suns
๐ฎ --> Lords of the Fallen & Octopath Traveler
๐ --> The Subtle Art of Not Giving A F*ck
Roma no se construyรณ en un story point.
Senior Project Reviewer at Outlier AI | Lead Developer at Beef Erikson Studios
Self-taught developer of 10+ years, lost track. Extreme archivist / researcher of all things gaming starting with Atari 2600 on. Living cartoon.
๐ https://benson-chen.co
Sr. Frontend @ Tomofun
Software, AI, playing with LLMs, gamedev, chess
๐ช๐ป Empowering build in public community
Use #buildinginpublic or #buildinpublic will repost the most interesting projects and stories everyday ๐ฅณ
Page dedicated to support who are building in public โค๏ธ
Building a CSS course: layoutmaestro.ishadeed.com. Design Engineer. Author of debuggingcss.com โข Blogging at ishadeed.com. Made defensivecss.dev, rtlstyling.com, and a11ymatters.com. @GoogleDevExpert in Web UI. ๐ Tulkarm, Palestine.
FreeFrontend.com is a valuable resource for both web designers seeking new inspiration and developers looking to enhance the functionality of their projects.
HTML, CSS, Bootstrap, Tailwind, JavaScript, React, Vue, jQuery.
Whether you're just getting into tech or levelling up your coding skills, we're here to help you shine. What will you build? www.scrimba.com
Level 40 goblin wannabe who would rather be living in a swamp with the frogs ๐ธ Also an aspiring WebDev who is trying hard to learn new things.
๐ Tech Enthusiast | AI & Dev Tools ๐ ๏ธ
๐ฅ Sharing insights on Next.js, Payload, Supabase, Tailwind, AI, and serverless architecture.
๐บ Watch my tutorials & build with me: https://www.youtube.com/channel/UClxm1AYVvel_7Lhft3FPdhg
๏ฃฟ Apple Evangelist on the Web Developer Experience team for Safari & Webkit. #PwME
Web evangelist at Apple ๏ฃฟ, founder CodeNewbie (acquired), developer, creator, chief baker of the Try Bakery (located in my kitchen โค๏ธ)
webmistress โฆ visual artist โฆ bisexual marxist โฆ she/her โฆ all killer, no filler โฆ views are my own โฆ ๐ต๐ท๐ฎ๐ฑ๐ https://skullface.me