Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update canUseLayoutEffect check to also allow for layout effects in React Native #11901

Merged
merged 3 commits into from
Jun 24, 2024

Conversation

phryneas
Copy link
Member

For comparison: https://github.com/reduxjs/react-redux/blob/e05ed6840075c9cb75564cb072aa1932f46ce11f/src/utils/useIsomorphicLayoutEffect.ts

Seems like we didn't include a check for React Native in the past, so useIsomorphicLayoutEffect would always behave like useEffect in RN.
Also, our version of the uSES shim would write synchronously to the ref during rendering in RN, which is also problemativ.

Copy link

changeset-bot bot commented Jun 20, 2024

🦋 Changeset detected

Latest commit: 09e90fd

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@apollo/client Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Copy link
Contributor

github-actions bot commented Jun 20, 2024

size-limit report 📦

Path Size
dist/apollo-client.min.cjs 38.65 KB (+0.01% 🔺)
import { ApolloClient, InMemoryCache, HttpLink } from "dist/main.cjs" 47.43 KB (+0.02% 🔺)
import { ApolloClient, InMemoryCache, HttpLink } from "dist/main.cjs" (production) 45 KB (+0.01% 🔺)
import { ApolloClient, InMemoryCache, HttpLink } from "dist/index.js" 34.2 KB (+0.02% 🔺)
import { ApolloClient, InMemoryCache, HttpLink } from "dist/index.js" (production) 32.06 KB (+0.03% 🔺)
import { ApolloProvider } from "dist/react/index.js" 1.24 KB (+0.56% 🔺)
import { ApolloProvider } from "dist/react/index.js" (production) 1.22 KB (+0.49% 🔺)
import { useQuery } from "dist/react/index.js" 5.3 KB (+0.19% 🔺)
import { useQuery } from "dist/react/index.js" (production) 4.37 KB (+0.16% 🔺)
import { useLazyQuery } from "dist/react/index.js" 5.58 KB (+0.15% 🔺)
import { useLazyQuery } from "dist/react/index.js" (production) 4.65 KB (+0.24% 🔺)
import { useMutation } from "dist/react/index.js" 3.57 KB (+0.17% 🔺)
import { useMutation } from "dist/react/index.js" (production) 2.79 KB (+0.22% 🔺)
import { useSubscription } from "dist/react/index.js" 3.21 KB (+0.16% 🔺)
import { useSubscription } from "dist/react/index.js" (production) 2.41 KB (+0.21% 🔺)
import { useSuspenseQuery } from "dist/react/index.js" 5.45 KB (+0.17% 🔺)
import { useSuspenseQuery } from "dist/react/index.js" (production) 4.11 KB (+0.1% 🔺)
import { useBackgroundQuery } from "dist/react/index.js" 4.96 KB (+0.22% 🔺)
import { useBackgroundQuery } from "dist/react/index.js" (production) 3.61 KB (+0.17% 🔺)
import { useLoadableQuery } from "dist/react/index.js" 5.03 KB (+0.1% 🔺)
import { useLoadableQuery } from "dist/react/index.js" (production) 3.67 KB (+0.19% 🔺)
import { useReadQuery } from "dist/react/index.js" 3.34 KB (+0.3% 🔺)
import { useReadQuery } from "dist/react/index.js" (production) 3.28 KB (+0.33% 🔺)
import { useFragment } from "dist/react/index.js" 2.3 KB (+0.52% 🔺)
import { useFragment } from "dist/react/index.js" (production) 2.24 KB (+0.53% 🔺)

@phryneas phryneas requested a review from alessbell June 20, 2024 12:29
Copy link

netlify bot commented Jun 20, 2024

Deploy Preview for apollo-client-docs ready!

Name Link
🔨 Latest commit 91c9f7d
🔍 Latest deploy log https://app.netlify.com/sites/apollo-client-docs/deploys/66799a016caed90008cc6739
😎 Deploy Preview https://deploy-preview-11901--apollo-client-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link
Member

@jerelmiller jerelmiller left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎉

@phryneas phryneas merged commit 10a8c0a into main Jun 24, 2024
42 checks passed
@github-actions github-actions bot mentioned this pull request Jun 24, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants