lin's Avatar

lin

@symsys.bsky.social

currently doing #100Days of Frontend & Design Engineering ๐Ÿ’ป Sharing the most common FE interview questions + answers, follow along!

21 Followers  |  17 Following  |  75 Posts  |  Joined: 29.05.2025  |  2.3234

Latest posts by symsys.bsky.social on Bluesky

โš›๏ธ 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
Video thumbnail

โš›๏ธ 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
Video thumbnail

โš›๏ธ 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
Post image Post image

โš›๏ธ 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
Video thumbnail

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
Video thumbnail

โš›๏ธ 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
Video thumbnail

โš›๏ธ 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
Post image Post image

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
Video thumbnail

โš›๏ธ 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
Post image

โš›๏ธ 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
Preview
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
Post image

โš›๏ธ 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
Post image

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
Post image

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

@symsys is following 17 prominent accounts