concept dependency in category react
appears as: dependencies, dependency, dependencies, dependency

This is an excerpt from Manning's book React Hooks in Action.
Use the dispatch function to dispatch actions to the reducer. For a particular call to useReducer, React will always return the same dispatch function. (Having an unchanging function is important when re-renders may depend on changing props or dependencies, as we see in later chapters.)
Controlling when an effect runs by specifying dependencies
Figure 5.6 When calling useEffect, you can specify a list of dependencies and return a clean-up function.
![]()