...

/

Adding More Options to useDependency Hook

Adding More Options to useDependency Hook

Examine how to enhance the “useDependency” hook to cover more use cases.

Configuration for dependency object

In the previous lesson, the content was the only available option in the dependency object. Now, two new options are added here:

  • The strategy string tells the hook how to get the requested prop. Valid values can be like fetch, store, cache etc.
  • The store object can be provided with external actionCreator to call after prop
...