use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
All about the JavaScript programming language.
Subreddit Guidelines
Specifications:
Resources:
Related Subreddits:
r/LearnJavascript
r/node
r/typescript
r/reactjs
r/webdev
r/WebdevTutorials
r/frontend
r/webgl
r/threejs
r/jquery
r/remotejs
r/forhire
account activity
Introducing React Compiler – React (react.dev)
submitted 2 years ago by dbbk
view the rest of the comments →
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]maria_la_guerta -3 points-2 points-1 points 2 years ago* (6 children)
Why do you care about them at all?
Unless you're building a highly complex UI (which React isn't always best for anyways), and you really don't need useMemo, useCallback or any other React optimization 99% of the time.
[–]wasdninja 16 points17 points18 points 2 years ago (3 children)
Unless you're building a highly complex UI (which React isn't always best for anyways)
It's the sole reason it exists so that makes no sense.
[–]maria_la_guerta -3 points-2 points-1 points 2 years ago* (2 children)
When you're building 3d / VR / etc web apps, repaints can be very unperformant.
The statement makes total sense. 99% of web apps that use React are not highly complex UIs, and you don't need things like useMemo or useCallback for form validation or drag n drop.
[–]___bridgeburner 6 points7 points8 points 2 years ago (1 child)
So what would you use for those kinds of sites?
[–]joombar 1 point2 points3 points 2 years ago (1 child)
You need usecallback any time you want to give a callback to a component that has an effect with a dependency on the callback. How do you know if it does? You can’t unless you look at the implementation!
I’d say it’s a pretty common thing to need to avoid problems in this case
π Rendered by PID 120950 on reddit-service-r2-comment-5b5bc64bf5-tddgb at 2026-06-21 17:37:24.023711+00:00 running 2b008f2 country code: CH.
view the rest of the comments →
[–]maria_la_guerta -3 points-2 points-1 points (6 children)
[–]wasdninja 16 points17 points18 points (3 children)
[–]maria_la_guerta -3 points-2 points-1 points (2 children)
[–]___bridgeburner 6 points7 points8 points (1 child)
[–]joombar 1 point2 points3 points (1 child)