feat: Initial devtools support (#1125)

This commit is contained in:
Guillaume Chau
2020-07-17 00:18:52 +02:00
committed by GitHub
parent 5ed73cd874
commit 568b6db12b
15 changed files with 132 additions and 17 deletions

View File

@@ -49,6 +49,7 @@ import {
markAttrsAccessed
} from './componentRenderUtils'
import { startMeasure, endMeasure } from './profiling'
import { componentAdded } from './devtools'
export type Data = { [key: string]: unknown }
@@ -408,6 +409,9 @@ export function createComponentInstance(
}
instance.root = parent ? parent.root : instance
instance.emit = emit.bind(null, instance)
__DEV__ && componentAdded(instance)
return instance
}