4 ms·
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.
by agrippanux 8y ago
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.