Skip to content

Commit

Permalink
Merge pull request #2 from mecirmartin/patch-1
Browse files Browse the repository at this point in the history
Check if window.__skip_render is set
  • Loading branch information
jozef-slezak authored Mar 1, 2021
2 parents 4101cc9 + d785233 commit d4bbd3a
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,12 @@ import { BrowserRouter } from 'react-router-dom';
import * as serviceWorker from './serviceWorker';
import App from './App';

ReactDOM.render((
<BrowserRouter>
<App />
</BrowserRouter>
), document.getElementById('root'));
if(!window.__skip_render){
ReactDOM.render((
<BrowserRouter>
<App />
</BrowserRouter>
), document.getElementById('root'));
}

serviceWorker.unregister();

0 comments on commit d4bbd3a

Please sign in to comment.