feat(hmr): reload and force slot update on re-render

This commit is contained in:
Evan You
2019-12-12 18:13:59 -05:00
parent ef50c333ce
commit f77ae132e5
7 changed files with 73 additions and 16 deletions

View File

@@ -37,7 +37,10 @@ export interface FunctionalComponent<P = {}> {
props?: ComponentPropsOptions<P>
inheritAttrs?: boolean
displayName?: string
// internal HMR related flags
__hmrId?: string
__hmrUpdated?: boolean
}
export type Component = ComponentOptions | FunctionalComponent
@@ -136,6 +139,9 @@ export interface ComponentInternalInstance {
[LifecycleHooks.ACTIVATED]: LifecycleHook
[LifecycleHooks.DEACTIVATED]: LifecycleHook
[LifecycleHooks.ERROR_CAPTURED]: LifecycleHook
// hmr marker (dev only)
renderUpdated?: boolean
}
const emptyAppContext = createAppContext()