pmndrs / drei

🥉 useful helpers for react-three-fiber
https://drei.pmnd.rs/
MIT License
7.83k stars 642 forks source link

fix: add treeshakable to useProgress #1981

Open mayank1513 opened 4 weeks ago

mayank1513 commented 4 weeks ago

This will ensure that only one instance of useProgess is created. For more info please see https://github.com/react18-tools/treeshakable/ and https://treeshakable.vercel.app/

Why

Enhancement: allow importing from the component files, e.g., ./web/Loader to avoid importing unnecessary code.

What

Wrapped store creation inside treeshakable

Checklist

vercel[bot] commented 4 weeks ago

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

Name Status Preview Comments Updated (UTC)
drei ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 4, 2024 5:09am
codesandbox-ci[bot] commented 4 weeks ago

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

mayank1513 commented 4 weeks ago

Not updating KeyboardControls as the store is created within the component and passed to children using context. Updating this will require breaking changes.