Upon navigating to the site's index the browser's history will be like so:
All is well. However after navigating to Page 2, the history will be:
This is the issue. Page 2 should be Home Page. Navigating back will correctly take you to the home page, it's just the title in the history is incorrect.
This PR resolves the issue by adding a 0ms timeout to the setting of document.title.
Hey, thanks for all the great work on these packages.
The issue I'm experiencing:
It seems that when changing the page title at the route level, the title updates before the old route is pushed to the browser's history.
E.g.
Upon navigating to the site's index the browser's history will be like so:
All is well. However after navigating to Page 2, the history will be:
![Flow-router-title-2](https://user-images.githubusercontent.com/8485492/54579002-56c1f600-4a4d-11e9-86d7-02916726cb7c.png)
This is the issue.
Page 2
should beHome Page
. Navigating back will correctly take you to the home page, it's just the title in the history is incorrect.This PR resolves the issue by adding a 0ms timeout to the setting of
document.title
.Cheers, Morgan