News for hackers. Stuff that matters.
Re:A guide to useEffect in React by miccah on Monday March 11, 2019 @01:51AM (#19356965)
Maybe I'm not the target audience, but I have no clue what "useEffect" does or why it is important. An introduction on the subject (including which language is being discussed) would be really helpful.
Re:A guide to useEffect in React by agrippanux on Monday March 11, 2019 @02:06AM (#19357014)
React 16.8 introduced a new concept of hooks, "useEffect" being a built in one. Hooks are extremely useful for streamlining and reusing React component code. "useEffect" in particular can supplant the "componentDidMount" method which among other things is common for fetching data into a component. There are some gotchas to be aware of when using "useEffect" and this article is explaining them.
Re:A guide to useEffect in React by uhryks on Monday March 11, 2019 @02:21AM (#19357066)
There's a link in the first sentence of the article. It would have taken you less time reading it than it probably took you to write this comment.
Re:A guide to useEffect in React by lkbr on Monday March 11, 2019 @02:33AM (#19357093)
Also "This article assumes that you’re somewhat familiar with useEffect API." with another link a little further down.
Re:A guide to useEffect in React by bzalasky on Monday March 11, 2019 @01:58AM (#19356986)
In the JavaScript UI library React, useEffect is a hook (recent addition to the library) that allows you to perform side effects in function components. https://reactjs.org/docs/hooks-effect.html