drei
drei copied to clipboard
fix(Stage): wrap the environment with suspense
Why
Environment in the Stage component isn't wrapped in Suspense, so changing the environment prop on it causes the whole stage component flash till the new environment is loaded.
Ideally it would be good if we can keep the previous environment till the new one is loaded, thoughts on this ?
What
Wrapped the Environment component in Suspense and added fallback prop on the stage component
Checklist
- [ ] Documentation updated
- [ ] Storybook entry added
- [ ] Ready to be merged
If the draft is ok then I will update the doc with the fallback prop details if required
The latest updates on your projects. Learn more about Vercel for Git ↗︎
Name | Status | Preview | Updated |
---|---|---|---|
drei | ❌ Failed (Inspect) | Sep 7, 2022 at 4:02AM (UTC) |
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.
Latest deployment of this branch, based on commit 291092ce7a7518176b65e69a4513a89a8b0f949d:
Sandbox | Source |
---|---|
thirsty-sea-12sn3n | Configuration |
Ground reflections and video textures | Configuration |
arc-x-pmndrs-colors | Configuration |
keeping the previous would be possible with useTransition
what do you mean by prop is a transition
?
On Tue, Sep 6, 2022 at 6:48 PM — @.***> wrote:
@dineshsalunke https://github.com/dineshsalunke keeping the current one would be possible if the prop is a transition.
— Reply to this email directly, view it on GitHub https://github.com/pmndrs/drei/pull/1008#issuecomment-1238140311, or unsubscribe https://github.com/notifications/unsubscribe-auth/AMS6OEJBFHY777UTPYRZBQ3V45ADHANCNFSM564ALEWQ . You are receiving this because you were mentioned.Message ID: @.***>
@drcmda we might need to update types for react