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

Is there a way to SSR the toast so it appears in the initial HTML? #390

Open
iamkd opened this issue Jan 24, 2025 · 0 comments
Open

Is there a way to SSR the toast so it appears in the initial HTML? #390

iamkd opened this issue Jan 24, 2025 · 0 comments

Comments

@iamkd
Copy link

iamkd commented Jan 24, 2025

I know this is a pretty niche use case, but we want to show toasts after successful form submission and redirect.

Using useEffect and reading from query params/cookies works fine, but we are seeing a noticeable hit to our performance metrics (LCP), because the toast counts as the LCP element and it only appears after the React app is mounted.

If there is any possibility to actually trigger the toast during the SSR pass so it appears in the initial HTML, it would help us a lot!

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

No branches or pull requests

1 participant