-
Book Overview & Buying
-
Table Of Contents
Designing React Hooks the Right Way
By :
Here are some questions and answers to refresh your knowledge:
A side effect is when a function relies on or modifies something outside of its input arguments. A very common side effect is the use of console.log inside a function.
useEffect?The useEffect hook is a way of defining a side effect callback to be invoked after a screen update in React. The effect can be invoked every time or when one of its dependencies changes. Therefore, the useEffect hook can be also used for listening for value changes.
useEffect?The useEffect hook is a common hook in the React family. If used along with the useState hook, it can easily communicate with external resources and bring results on screen. External resources can be web servers, DOM elements, window objects, document objects, or any third-party entities.
Change the font size
Change margin width
Change background colour