Closed addamove closed 4 years ago
Current Behavior Just the latest CRA with few routes. When you upload it to Heroku it shows the root route for every route for a few seconds.
Config
"reactSnap": { "cacheAjaxRequests": true, "inlineCss": true, "http2PushManifest": true, "puppeteerArgs": [ "--no-sandbox", "--disable-setuid-sandbox" ] },
import {BrowserRouter as Router, Route, Switch} from 'react-router-dom'; const ComponentA = () => <div>A</div>; const ComponentB = () => <div>B</div>; const Root = () => <h1>ROOT</h1>; const App = () => ( <Router> <div> <Switch> <Route path='/' exact component={Root} /> <Route path='/a' exact component={ComponentA} /> <Route path='/b' exact component={ComponentB} /> </Switch> </div> </Router> ); export default App;
Reproducible demo Link to GitHub repository or codesandbox with a demo of the bug behavior.
https://coursebud-staging.herokuapp.com/a - temporary you can look at the issue here. You can easily see it if throttle network speed
Expected behavior/code Always show correct route during loading
Additional context/Screenshots For example, for https://coursebud-staging.herokuapp.com/a page it shows "ROOT" for a second which is not expected
Cannot keep demo live anymore
Bug Report
Current Behavior Just the latest CRA with few routes. When you upload it to Heroku it shows the root route for every route for a few seconds.
Config
Reproducible demo Link to GitHub repository or codesandbox with a demo of the bug behavior.
https://coursebud-staging.herokuapp.com/a - temporary you can look at the issue here. You can easily see it if throttle network speed
Expected behavior/code Always show correct route during loading
Additional context/Screenshots For example, for https://coursebud-staging.herokuapp.com/a page it shows "ROOT" for a second which is not expected