AmazingViegas
AmazingViegas
TTCTheo's Typesafe Cult
Created by AmazingViegas on 2/19/2024 in #questions
Shadcn Toast not showing using useEffect
Thank you for the tip! I openned an issue in the lib's github. Will let you know when something happens.
10 replies
TTCTheo's Typesafe Cult
Created by AmazingViegas on 2/19/2024 in #questions
Shadcn Toast not showing using useEffect
I made this stackblitz that perfectly demonstrates my problem: https://stackblitz.com/edit/stackblitz-starters-hzwlsc?file=app%2Flayout.tsx
10 replies
TTCTheo's Typesafe Cult
Created by AmazingViegas on 2/19/2024 in #questions
Shadcn Toast not showing using useEffect
Yes, I think it really is a Sonner bug
10 replies
TTCTheo's Typesafe Cult
Created by AmazingViegas on 2/19/2024 in #questions
Shadcn Toast not showing using useEffect
And the same happens in Sonner toasts btw
10 replies
TTCTheo's Typesafe Cult
Created by AmazingViegas on 2/19/2024 in #questions
Shadcn Toast not showing using useEffect
Yes! It works when I render a toast on button click just not on useEffect
export default function RootLayout({
children,
}: Readonly<{
children: React.ReactNode;
}>) {
return (
<html lang="en">
<body className={inter.className}>
{children}
<Toaster />
</body>
</html>
);
}
export default function RootLayout({
children,
}: Readonly<{
children: React.ReactNode;
}>) {
return (
<html lang="en">
<body className={inter.className}>
{children}
<Toaster />
</body>
</html>
);
}
10 replies