Top all-time · #5220
Zhenghao He
Personal blog · zhenghao.io/postsprogrammingcareer
Zhenghao He's personal blog at zhenghao.io covers programming and career. Since 2022, 15 different Hacker News readers have linked it 27 times, most often “Preemptive memoization in React is probably not Evil (yet)”. The last post was in 2023, but the archive is still widely read.
Too few sampled comments (9) to say how often HN recommends it.?
Why HN links it
HN readers link Zhenghao He's blog for posts on React rendering behaviour, when components re-render, memoization with useMemo and useCallback, and system design interviews.
Summarised by Claude from a sample of 9 HN comments that link here. Each comment is marked recommending, critical or neutral (citing without judging); how this works.
The official site of Zhenghao He, a software engineer and a TypeScript/JavaScript enthusiast.
Most-linked posts?
- Preemptive memoization in React is probably not Evil (yet)4 people · 4 mentions · first linked 2022-03-21
- Front End vs. Back End System Design Interviews3 people · 3 mentions · first linked 2022-01-17
- When You Should Prefer Map over Object in JavaScript3 people · 3 mentions · first linked 2022-06-20
- When Does React Render Your Component?2 people · 6 mentions · first linked 2022-03-28
- The Double-Assignment Pattern in jQuery's Source Code2 people · 2 mentions · first linked 2022-03-18
- Front End vs. Back End System Design Interviews2 people · 2 mentions · first linked 2022-01-17
What Hacker News says?
Yes. React re-renders components recursively by default. So, any state update in a parent component will recurse through and render all child components. But, a "render" does not necessarily imply a "DOM update" - it's about asking the components "what do you want the UI to look like now?", and determining _if_ updates are needed. This can be optimized if needed. For more details, see: - https://blog.isquaredsoftwar…
Comment linking /posts/react-rerender
on “React v18.0”Submitted An introduction to type programming in TypeScript as a story · 148 points
HN discussionEDIT: Paste this hacky snippet into your browser's console to save all of the links into your clipboard: (() => { let result = [...document.querySelectorAll('td a')] .map((link) => link && !link.href.includes('ycombinator') && !link.href.includes('javascript:void') ? link.href : '' ) .filter(Boolean); result = [...new Set(result)]; result.sort(); copy(result.join('\n\n')); })(); Just to help, here's a compiled-list…
Comment linking /
on “Ask HN: Great Blogs by Programmers”Submitted A complete guide to TypeScript’s 'never' type as a story · 95 points
HN discussionMe, myself: https://www.zhenghao.io/ Check it out if you are interested in JavaScript, TypeScript, or web development in general
Comment linking /
on “Ask HN: Great Blogs by Programmers”Submitted Include debugging in the interview process as a story · 67 points
HN discussionJosh's post is excellent! Related, a couple years back I wrote a post on the same topic: "A (Mostly) Complete Guide to React Rendering Behavior" [0]. It's longer and has more details, but fewer diagrams :) (Josh's ability to make interactive posts is amazing.) I originally wrote my "Rendering Behavior" post specifically because the existing React docs didn't clearly spell out this kind of behavior, and I was _consta…
Comment linking /posts/react-rerender
on “Why React Re-Renders”Submitted Type Polymorphic Functions in TypeScript as a story · 37 points
HN discussionThat's why a number of people (myself included) advocate for overzealous/defensive use of useMemo/useCallback as a means of ensuring that a prop changing is always meaningful. The rationale is summarised here: https://www.zhenghao.io/posts/memo-or-not There are good reasons for _not_ doing this, since using these hooks isn't free; and technically speaking useMemo isn't an identity guarantee (though it currently beha…
Comment linking /posts/memo-or-not
on “Hooks Considered Harmful”Submitted JSON and the Stringification Oddities in JavaScript as a story · 4 points
HN discussionAnything particular you want to know about it? Assuming you're asking more along the lines of "how does it work internally?", these are my usual recommendations: - My own extensive post "A (Mostly) Complete Guide to React Rendering Behavior": https://blog.isquaredsoftware.com/2020/05/blogged-answers-a-... - Related, "When does React render your component?", which looks more at the source level checks: https://www.zh…
Comment linking /posts/react-rerender
on “The self-fulfilling prophecy of React”Submitted When Does React Render Your Component? as a story · 4 points
HN discussionI would strongly suggest reading through my extensive post "A (Mostly) Complete Guide to React Rendering Behavior" [0], which walks through what "rendering" actually is, what triggers it, React's default behavior, and ways to optimize the behavior by skipping renders for certain components. The post "When Does React Render Your Component?" [1] is also excellent. The short summary is that React queues a render when y…
Comment linking /posts/react-rerender
on “UIs are not pure functions of the model (2018)”Submitted Preemptive memoization in React is probably not Evil (yet) as a story · 4 points
HN discussionSee my extensive post "A (Mostly) Complete Guide to React Rendering Behavior": - https://blog.isquaredsoftware.com/2020/05/blogged-answers-a-... as well as these other excellent posts on React's internals and implementation: - When does React render your component?: https://www.zhenghao.io/posts/react-rerender - A Complete Guide to useEffect: https://overreacted.io/a-complete-guide-to-useeffect/ - Getting Closure on…
Comment linking /posts/react-rerender
on “A Visual Guide to UseEffect”Submitted When You Should Prefer Map over Object in JavaScript as a story · 3 points
HN discussionIt looks like you submitted the wrong link judging by the title, did you mean https://www.zhenghao.io/posts/system-design-interviews instead ?
Comment linking /posts/system-design-interviews
on “Front End vs. Back End System Design Interviews”Submitted Preemptive memoization in React is probably not Evil (yet) as a story · 3 points
HN discussionSubmitted Detect JavaScript Memory Leaks with QueryObjects as a story · 2 points
HN discussionSubmitted Prefer Map over Object in JavaScript as a story · 2 points
HN discussionSubmitted The Double-Assignment Pattern in jQuery's Source Code as a story · 2 points
HN discussionSubmitted Preemptive Memoization in React Is Probably Not Evil (Yet) as a story · 2 points
HN discussionSubmitted The Double-Assignment Pattern in jQuery's Source Code as a story · 2 points
HN discussionSubmitted Front End vs. Back End System Design Interviews as a story · 2 points
HN discussionSubmitted The type hierarchy tree in TypeScript as a story · 2 points
HN discussionSubmitted When You Should Prefer Map over Object in JavaScript as a story · 1 points
HN discussionSubmitted Front End vs. Back End System Design Interviews as a story · 1 points
HN discussion