Skip to content

[SDK] Lazy import native dependencies in React Native #6832

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

Merged

Conversation

joaquim-verges
Copy link
Member

@joaquim-verges joaquim-verges commented Apr 24, 2025


PR-Codex overview

This PR focuses on implementing lazy loading for native dependencies in the InAppNativeConnector class, optimizing performance by importing modules only when needed.

Detailed summary

  • Added lazy imports for various modules in packages/thirdweb/src/wallets/in-app/native/native-connector.ts.
  • Converted several function imports to use await import() syntax for on-demand loading.
  • Updated preAuthenticate, logout, and other methods to support new import structure.

✨ Ask PR-Codex anything about this PR by commenting with /codex {your question}

Copy link

vercel bot commented Apr 24, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
docs-v2 ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 24, 2025 2:19am
login ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 24, 2025 2:19am
thirdweb_playground ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 24, 2025 2:19am
thirdweb-www ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 24, 2025 2:19am
wallet-ui ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 24, 2025 2:19am

Copy link

changeset-bot bot commented Apr 24, 2025

🦋 Changeset detected

Latest commit: 377c4e9

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

This PR includes changesets to release 2 packages
Name Type
thirdweb Patch
@thirdweb-dev/wagmi-adapter 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

@github-actions github-actions bot added packages SDK Involves changes to the thirdweb SDK labels Apr 24, 2025
Copy link
Member Author


How to use the Graphite Merge Queue

Add either label to this PR to merge it via the merge queue:

  • merge-queue - adds this PR to the back of the merge queue
  • hotfix - for urgent hot fixes, skip the queue and merge this PR next

You must have a Graphite account in order to use the merge queue. Sign up using this link.

An organization admin has enabled the Graphite Merge Queue in this repository.

Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue.

This stack of pull requests is managed by Graphite. Learn more about stacking.

Copy link
Contributor

size-limit report 📦

Path Size Loading time (3g) Running time (snapdragon) Total time
thirdweb (esm) 51.16 KB (0%) 1.1 s (0%) 211 ms (+196.99% 🔺) 1.3 s
thirdweb (cjs) 143.77 KB (0%) 2.9 s (0%) 365 ms (+88.27% 🔺) 3.3 s
thirdweb (minimal + tree-shaking) 5.66 KB (0%) 114 ms (0%) 77 ms (+1177.83% 🔺) 190 ms
thirdweb/chains (tree-shaking) 514 B (0%) 11 ms (0%) 38 ms (+2090.16% 🔺) 48 ms
thirdweb/react (minimal + tree-shaking) 19.33 KB (0%) 387 ms (0%) 125 ms (+867.09% 🔺) 512 ms

@joaquim-verges joaquim-verges merged commit 436750e into main Apr 24, 2025
22 of 23 checks passed
@joaquim-verges joaquim-verges deleted the _SDK_Lazy_import_native_dependencies_in_React_Native branch April 24, 2025 02:35
@joaquim-verges joaquim-verges mentioned this pull request Apr 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
packages SDK Involves changes to the thirdweb SDK
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant