Skip to content

Conversation

@flt3150sk
Copy link
Contributor

Docs: Add Lazy Loading (React.lazy + Suspense)

Summary

  • Documentation-only update adding a “Lazy loading” section to the README
  • Demonstrates the official React.lazy approach with createCallable
  • No runtime or API changes; zero bundle-size impact

Context

What’s Changed

  • README
    • Add “Lazy loading” section
    • Show createCallable(lazy(() => import('./Confirm'))) usage
    • Recommend wrapping <Confirm.Root /> in <Suspense>
    • Note default export requirement for lazy modules
    • Explain on-demand chunk loading (code splitting)

Rationale

  • Aligns with owner guidance to keep the library surface minimal
  • Uses standard React primitives and avoids bundle-size increases

Impact

  • Docs-only; no new helpers, exports, or behavior changes
  • No changes to build, CI, demo, or tests

References

@vercel
Copy link

vercel bot commented Aug 30, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
react-call Ready Ready Preview Comment Aug 30, 2025 2:04am

@desko27
Copy link
Owner

desko27 commented Aug 31, 2025

@flt3150sk excellent work, thanks a lot!

@desko27 desko27 merged commit 2eb9b26 into desko27:main Aug 31, 2025
6 checks passed
@desko27 desko27 mentioned this pull request Aug 31, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants