Closed mateusznurzynski closed 1 year ago
I would like to be assigned to this issue please.
These critiques do seem valid and substantive enough to probably warrant the removal of this article IMO, @TheOdinProject/react any opposition?
I agree, this is confusing and should be removed or replaced. If there's an alternative with a good amount of example use cases (and explanations on why they are great candidates for useEffect
), that would have my preference since otherwise this lesson and its articles mostly emphasises when NOT to use useEffect
.
Since I've had a +1 and no objections I'll go ahead and assign you @JayRKyd. Thanks for volunteering to do this!
Describe your suggestion
This article in the assignments section provides wrong information: https://dev.to/colocodes/6-use-cases-of-the-useeffect-reactjs-hook-282o
It uses the useEffect hook for things that don't need it.
For example it uses it for input validation:
The useEffect hook is not necessary here. (You could just use an event handler)
The use cases provided in this article are very confusing, because they contradict with what was said in the "But do we need the effect?" section of the lesson and in the react docs. React docs: https://react.dev/learn/you-might-not-need-an-effect Odin lesson: https://www.theodinproject.com/lessons/node-path-react-new-how-to-deal-with-side-effects#but-do-we-need-the-effect
There are also some other issues that people have pointed out in the comments section of this article.
Path
Node / JS
Lesson Url
https://www.theodinproject.com/lessons/node-path-react-new-how-to-deal-with-side-effects#but-do-we-need-the-effect
Checks
(Optional) Discord Name
raptor_3315
(Optional) Additional Comments
No response