Notification transition not working
speccaN opened this issue · comments
Eric Lindeberg commented
The notification popups are not triggering their transition, they just instantly appears and disappears.
Do you have any idea what might be the issue?
Tried on macOS Monterey and Windows 10
Chrome and Safari
I managed to do a workaround like this (not the prettiest, but it works)
Notification.tsx
const [show, setShow] = React.useState(false);
React.useEffect(() => {
setTimeout(() => {
setShow(true);
}, 50);
}, []);
<Transition
show={show}
/*...*/
>
...
<button
onClick={() => {
setShow(false);
setTimeout(() => {
onDismiss(id);
}, 100);
}}}
Gregor Weichbrodt commented
It's because the <Transition>
-element is missing the appear={true}
property.