Skip to content

Commit 4392a2c

Browse files
authored
Add router.onReady to Final State Injection (#251)
Add router.onReady to client-side app amount to avoid bailing hydration and performing full client-side render. e.g. it will cause rehydration fail when the page component is async
1 parent 3a55f08 commit 4392a2c

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

docs/guide/data.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,9 @@ if (window.__INITIAL_STATE__) {
189189
store.replaceState(window.__INITIAL_STATE__)
190190
}
191191

192-
app.$mount('#app')
192+
router.onReady(() => {
193+
app.$mount('#app')
194+
});
193195
```
194196

195197
## Store Code Splitting

0 commit comments

Comments
 (0)