Added rendertron flag

This commit is contained in:
vjrj 2018-05-07 23:56:10 +02:00
parent 03acf8ba65
commit 6e82e2813b
2 changed files with 5 additions and 0 deletions

View file

@ -1 +1,4 @@
import '../imports/startup/client';
// https://github.com/GoogleChrome/rendertron#rendering-budget-timeout
window.renderComplete = false;

View file

@ -60,6 +60,8 @@ class LocationListener extends Component {
// https://stackoverflow.com/questions/43512450/react-router-v4-route-onchange-event
componentDidMount() {
// https://github.com/GoogleChrome/rendertron#rendering-budget-timeout
window.renderComplete = true;
this.handleLocationChange(this.context.router.history.location);
this.unlisten =
this.context.router.history.listen(this.handleLocationChange);