@apollo/client 3.8.0-alpha.2 → 3.8.0-alpha.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/apollo-client.cjs +6 -2
- package/apollo-client.cjs.map +1 -1
- package/apollo-client.min.cjs +1 -1
- package/core/core.cjs +1 -1
- package/core/core.cjs.map +1 -1
- package/core/core.cjs.native.js +1 -1
- package/invariantErrorCodes.js +1 -1
- package/package.json +1 -1
- package/react/hooks/hooks.cjs +11 -1
- package/react/hooks/hooks.cjs.map +1 -1
- package/react/hooks/hooks.cjs.native.js +11 -1
- package/react/hooks/internal/index.d.ts +1 -0
- package/react/hooks/internal/index.d.ts.map +1 -1
- package/react/hooks/internal/index.js +1 -0
- package/react/hooks/internal/index.js.map +1 -1
- package/react/hooks/internal/useIsomorphicLayoutEffect.d.ts +3 -0
- package/react/hooks/internal/useIsomorphicLayoutEffect.d.ts.map +1 -0
- package/react/hooks/internal/useIsomorphicLayoutEffect.js +6 -0
- package/react/hooks/internal/useIsomorphicLayoutEffect.js.map +1 -0
- package/react/hooks/useSuspenseQuery.d.ts.map +1 -1
- package/react/hooks/useSuspenseQuery.js +3 -3
- package/react/hooks/useSuspenseQuery.js.map +1 -1
- package/version.js +1 -1
package/apollo-client.cjs
CHANGED
|
@@ -1345,7 +1345,7 @@ var concat = ApolloLink.concat;
|
|
|
1345
1345
|
|
|
1346
1346
|
var execute = ApolloLink.execute;
|
|
1347
1347
|
|
|
1348
|
-
var version = '3.8.0-alpha.
|
|
1348
|
+
var version = '3.8.0-alpha.3';
|
|
1349
1349
|
|
|
1350
1350
|
function isNodeResponse(value) {
|
|
1351
1351
|
return !!value.body;
|
|
@@ -7216,6 +7216,10 @@ function useDeepMemo(memoFn, deps) {
|
|
|
7216
7216
|
return ref.current.value;
|
|
7217
7217
|
}
|
|
7218
7218
|
|
|
7219
|
+
var useIsomorphicLayoutEffect = canUseLayoutEffect
|
|
7220
|
+
? React.useLayoutEffect
|
|
7221
|
+
: React.useEffect;
|
|
7222
|
+
|
|
7219
7223
|
function useSuspenseCache() {
|
|
7220
7224
|
var suspenseCache = React.useContext(getApolloContext()).suspenseCache;
|
|
7221
7225
|
__DEV__ ? tsInvariant.invariant(suspenseCache, 'Could not find a "suspenseCache" in the context. Wrap the root component ' +
|
|
@@ -7361,7 +7365,7 @@ function useObservableQueryResult(observable) {
|
|
|
7361
7365
|
if (!resultRef.current) {
|
|
7362
7366
|
resultRef.current = observable.getCurrentResult();
|
|
7363
7367
|
}
|
|
7364
|
-
|
|
7368
|
+
useIsomorphicLayoutEffect(function () {
|
|
7365
7369
|
isMountedRef.current = true;
|
|
7366
7370
|
return function () {
|
|
7367
7371
|
isMountedRef.current = false;
|