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

suggestion: Suspense support delay #24238

Closed
smbera opened this issue Apr 1, 2022 · 5 comments
Closed

suggestion: Suspense support delay #24238

smbera opened this issue Apr 1, 2022 · 5 comments
Assignees
Labels
Resolution: Needs More Information Resolution: Stale Automatically closed due to inactivity Status: Unconfirmed A potential issue that we haven't yet confirmed as a bug

Comments

@smbera
Copy link

smbera commented Apr 1, 2022

React version:

Steps To Reproduce

Link to code example:

The current behavior

The expected behavior

can Suspense support delay?
Everytime when render page, the fallback will first show, no matter components get fast

@smbera smbera added the Status: Unconfirmed A potential issue that we haven't yet confirmed as a bug label Apr 1, 2022
@smbera smbera changed the title Bug: suggestion: Suspense support delay Apr 1, 2022
@gaearon
Copy link
Collaborator

gaearon commented Apr 1, 2022

Can you be a bit more specific about what you're using Suspense for? Is it code splitting, data fetching, or something else? There are different solutions to this depending on what you're hitting.

@bvaughn
Copy link
Contributor

bvaughn commented Apr 1, 2022

Everytime when render page, the fallback will first show, no matter components get fast

Are you using the legacy render method? Have you tried using createRoot?

import { createRoot } from "react-dom/client";

const root = createRoot(domElement);
root.render(<YourApp />);

@sunderls
Copy link
Contributor

sunderls commented Apr 1, 2022

There seems to be some regression on Suspense fallback commit throttling?
throttling behavior seems to be added in this diff #15769

reproduced with below demo

in React 18-alpha version, throttled codesandbox link
in React 18 release version, this is no longer working codesandbox link

I also pulled a DRAFT pr #24253, but not confident enough for review yet..

Copy link

This issue has been automatically marked as stale. If this issue is still affecting you, please leave any comment (for example, "bump"), and we'll keep it open. We are sorry that we haven't been able to prioritize it yet. If you have any new additional information, please include it with your comment!

@github-actions github-actions bot added the Resolution: Stale Automatically closed due to inactivity label Apr 10, 2024
Copy link

Closing this issue after a prolonged period of inactivity. If this issue is still present in the latest release, please create a new issue with up-to-date information. Thank you!

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Apr 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Resolution: Needs More Information Resolution: Stale Automatically closed due to inactivity Status: Unconfirmed A potential issue that we haven't yet confirmed as a bug
Projects
None yet
Development

No branches or pull requests

4 participants