I'm trying to set up links that take the user out of the current SPA and into another one (or download a pdf).
I've tried using <a>
tags, however whenever I navigate to the paths were I want to not be in the SPA anymore, it shows the basic layout of the SPA I'm stuck in.
If I hard refresh on the proper paths, I see the other SPA, and in another case the pdf I'm trying to view.
Example anchor element: <a href="/requirements" rel="external" target="_blank">
Router code:
ReactDOM.render(
<Provider store={store}>
<ConnectedRouter history={history}>
<Route path="/" component={App(Main)} />
</ConnectedRouter>
</Provider>,
document.getElementById('root')
);
I generated the both SPAs with create react app. I also tried commenting out the service worker code, in case that was causing the issue.
I'm serving both SPAs using nginx reverse proxy.
I've also tried window.location.reload(true)
to force a hard reload, but it still does not work. I have to have chrome inspector open and cmd + shift + r to get a full hard reload.