use Switch , Component unchanging
zanjs opened this issue · 0 comments
zanjs commented
<Switch>
<Route
exact
path={RoutePath.home}
render={props => (
<LazyRoute {...props} component={import("../components/home")} />
)}
/>
<Route
path={RoutePath.topics}
render={props => (
<LazyRoute {...props} component={import("../components/topics")} />
)}
/>
<Route
path={RoutePath.histtory}
render={props => (
<LazyRoute {...props} component={import("../components/history")} />
)}
/>
<Route
path={RoutePath.count}
render={props => (
<LazyRoute {...props} component={import("../components/count")} />
)}
/>
<Route
path={RoutePath.birds}
render={props => (
<LazyRoute {...props} component={import("../components/birds")} />
)}
/>
<Route
path={RoutePath.about}
render={props => (
<LazyRoute {...props} component={import("../components/about")} />
)}
/>
<Route
path={RoutePath.lazyRoute}
render={props => (
<LazyRoute {...props} component={import("../components/lazyRoute")} />
)}
/>
<Route component={NotFound}/>
</Switch>