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 b9f5649 commit 5421674Copy full SHA for 5421674
src/index.js
@@ -27,7 +27,7 @@ export function AsyncComponent(props) {
27
setComponent(null)
28
cleanedUp = true
29
}
30
- }, [props])
+ }, [props.path])
31
32
return Component
33
? React.createElement(Component, props.otherProps)
@@ -52,6 +52,7 @@ export default function DynamicRoute(props) {
52
53
return (
54
<AsyncComponent
55
+ path={window.location.pathname}
56
component={props.page(window.location.pathname)}
57
loading={props.loading || 'Loading..'}
58
onError={props.onError || onError}
0 commit comments