-
Notifications
You must be signed in to change notification settings - Fork 130
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixes #269 Options are now re-evaluated when they change, which can be used to change the behavior of the component where the hook is used based on internal component state. For example, the `manual` option could be initially true and then set to false based on the value of a state property, causing the request to fire when this happens. Similarly, the `useCache` option could be set to true (its default value) then to false based on a condition, forcing the next request to skip the cache. Check out [this example](https://codesandbox.io/s/axios-hooks-options-change-v23tl) and the docs for additional information.
- Loading branch information
Showing
3 changed files
with
76 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters