You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
0 commit comments