ctrlplusb/react-async-component

No-match routes rendered during async loading

rhyek opened this issue · 1 comments

rhyek commented

With a route configuration such as:

<Route path="/one" component={AsyncComponentOne} />
<Route path="/two" component={AsyncComponentTwo} />
<Route component={NoMatch} />

NoMatch will show while the async components are loading. Any way around this?

rhyek commented

Nevermind! I'm an idiot and forgot to use <Switch>, so I was always getting the NoMatch rendered no matter what.