-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: correctly instantiate new API client if options change
before this change a new client would not be instantiated when some options change, as useMemo doesn’t deep compare the values in the dependencies array. The workaround to use state for it didn’t actually work. Also useMemo is meant to only be used as a performance improvement, which in this case is not enough because rely on the internal state of the API client so we don’t want to recreate it unless its options change.
- Loading branch information
Showing
3 changed files
with
51 additions
and
13 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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