Skip to content
This repository was archived by the owner on May 20, 2021. It is now read-only.

Commit 2ee7f61

Browse files
committed
update title on mount for non-server-rendered apps
1 parent fc1c58f commit 2ee7f61

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/createBrowserApp.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ export default function createBrowserApp(App) {
5959
_actionEventSubscribers = new Set();
6060
componentDidMount() {
6161
setHistoryListener(this._dispatch);
62+
this.updateTitle();
6263
this._actionEventSubscribers.forEach(subscriber =>
6364
subscriber({
6465
type: 'action',
@@ -69,6 +70,9 @@ export default function createBrowserApp(App) {
6970
);
7071
}
7172
componentDidUpdate() {
73+
this.updateTitle();
74+
}
75+
updateTitle() {
7276
const { state } = this._navigation;
7377
const childKey = state.routes[state.index].key;
7478
const activeNav = this._navigation.getChildNavigation(childKey);

0 commit comments

Comments
 (0)