chore: better warning when remounting a mounted app (#1297)
This commit is contained in:
parent
ad4841a892
commit
0b93440146
@ -225,7 +225,10 @@ export function createAppAPI<HostElement>(
|
|||||||
return vnode.component!.proxy
|
return vnode.component!.proxy
|
||||||
} else if (__DEV__) {
|
} else if (__DEV__) {
|
||||||
warn(
|
warn(
|
||||||
`App has already been mounted. Create a new app instance instead.`
|
`App has already been mounted.\n` +
|
||||||
|
`If you want to remount the same app, move your app creation logic ` +
|
||||||
|
`into a factory function and create fresh app instances for each ` +
|
||||||
|
`mount - e.g. \`const createMyApp = () => createApp(App)\``
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
Loading…
Reference in New Issue
Block a user