ctrlplusb / react-async-component

Resolve components asynchronously, with support for code splitting and advanced server side rendering use cases.
MIT License
1.45k stars 62 forks source link

No-match routes rendered during async loading #75

Closed rhyek closed 6 years ago

rhyek commented 6 years ago

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 6 years ago

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