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

Suspense doesn't work in layout with css modules (DEV-only) #639

Closed
dai-shi opened this issue Mar 31, 2024 · 3 comments · Fixed by #657
Closed

Suspense doesn't work in layout with css modules (DEV-only) #639

dai-shi opened this issue Mar 31, 2024 · 3 comments · Fixed by #657
Assignees

Comments

@dai-shi
Copy link
Owner

dai-shi commented Mar 31, 2024

We have a tricky case in an example.

const Layout = ({ children }: { children: ReactNode }) => {
return (
<div>
{children}
<Suspense fallback="Pending...">
<ServerMessage />
</Suspense>
</div>
);
};
const ServerMessage = async () => {
await new Promise((resolve) => setTimeout(resolve, 2000));
return <p>Hello from server!</p>;
};

It should show "Pending..." and then "Hello from server!".
However, it doesn't work as expected.

It seems like a regression in #446.
This is a dev-only issue.
@Aslemammad Can you investigate it please?

Here is a screencast that works before #446 commit.

Screen.Recording.2024-03-31.at.16.28.35.mov
@Aslemammad
Copy link
Contributor

I'll take a look.

@dai-shi
Copy link
Owner Author

dai-shi commented Apr 6, 2024

The example is moved from 09_cssmodules to 12_css in #641.

@dai-shi dai-shi mentioned this issue Apr 6, 2024
76 tasks
@dai-shi
Copy link
Owner Author

dai-shi commented Apr 9, 2024

working on it.

@dai-shi dai-shi assigned dai-shi and unassigned Aslemammad Apr 9, 2024
dai-shi added a commit that referenced this issue Apr 9, 2024
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 a pull request may close this issue.

2 participants