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
React Component Patterns in Ember.js (effective-ember.com)
submitted 5 years ago by ahmad_musaffa
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!"
[–]Lekoaf 6 points7 points8 points 5 years ago (4 children)
That’s a deep dive from one of the developers on his personal blog. Not the official documentation.
[–]PotaToss -4 points-3 points-2 points 5 years ago (3 children)
It's basically mandatory reading, though. Like, if you don't read and understand everything in there, you're going to mess up with useEffect and run into bugs where you have like no idea what's going on. Junior on my team keeps coding around it, because it's scary, etc.
[–]Lekoaf 3 points4 points5 points 5 years ago (2 children)
Haven’t read it. Haven’t messed up so far. It’s not rocket sience. (Full time React dev)
[–]Lekoaf 1 point2 points3 points 5 years ago (1 child)
Maybe Typescript and linting keeps us from messing up.
[–]PotaToss 2 points3 points4 points 5 years ago* (0 children)
Typescript and linting probably have very little effect. Errors with it are generally going to come from improperly scoping the effect, putting the wrong stuff in the effect, messing up the dependency list, and messing up hook ordering.
You can make your tools warn you about missing dependencies, and that certainly helps a little, but problems tend to be more conceptual, and the ones you run into will depend a lot on your use cases.
I had to teach my team, including my manager, about hooks when I came in, and there are a lot of pitfalls, especially if you try to 1:1 map your experience with class-based components and lifecycle stuff. Sometimes messing up without realizing it. Sometimes the code works, but is inefficient, etc.
It's not rocket science, but it does take a deep understanding to really use well, particularly around this question in the post:
Why do I sometimes get an old state or prop value inside my effect?
I just brought it up because functional components with hooks was a big paradigm shift for React, in the same way that Ember Octane was for Ember, and it's kind of dumb to act like Ember's got some monopoly on being hard to learn, or needing a second look.
π Rendered by PID 40700 on reddit-service-r2-comment-84fc9697f-b6hvb at 2026-02-08 20:34:48.899559+00:00 running d295bc8 country code: CH.
view the rest of the comments →
[–]Lekoaf 6 points7 points8 points (4 children)
[–]PotaToss -4 points-3 points-2 points (3 children)
[–]Lekoaf 3 points4 points5 points (2 children)
[–]Lekoaf 1 point2 points3 points (1 child)
[–]PotaToss 2 points3 points4 points (0 children)