We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 87a9b27 commit 285d293Copy full SHA for 285d293
examples/github-app/src/Boundary.tsx
@@ -1,3 +1,4 @@
1
+import { useRouter } from '@anansi/router';
2
import { AsyncBoundary } from '@data-client/react';
3
import { styled } from '@linaria/react';
4
import { Spin } from 'antd';
@@ -11,7 +12,13 @@ function Boundary({
11
12
children: ReactNode;
13
fallback?: ReactNode;
14
}) {
- return <AsyncBoundary fallback={fallback}>{children}</AsyncBoundary>;
15
+ const router = useRouter();
16
+
17
+ return (
18
+ <AsyncBoundary fallback={fallback} listen={router.history.listen}>
19
+ {children}
20
+ </AsyncBoundary>
21
+ );
22
}
23
export default memo(Boundary);
24
0 commit comments