We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent da42318 commit 82e5a3eCopy full SHA for 82e5a3e
1 file changed
src/hooks/useNotification.tsx
@@ -147,15 +147,18 @@ export default function useNotification(
147
setTaskQueue((queue) => [...queue, { type: 'destroy' }]);
148
},
149
}),
150
- [open],
+ [],
151
);
152
153
// ======================== Effect =========================
154
+ // React 18 should all in effect that we will check container in each render
155
+ // Which means getContainer should be stable.
156
React.useEffect(() => {
157
setContainer(getContainer());
158
});
159
160
161
+ // Flush task when node ready
162
if (notificationsRef.current && taskQueue.length) {
163
taskQueue.forEach((task) => {
164
switch (task.type) {
0 commit comments