warn on unmount (#485)
This commit is contained in:
@@ -57,6 +57,7 @@ function Choo (opts) {
|
||||
}
|
||||
var newTree = router(createLocation())
|
||||
tree = nanomorph(tree, newTree)
|
||||
assert.notEqual(tree, newTree, 'choo.start: a different node type was returned as the root node on a rerender. Make sure that the root node is always the same type to prevent the application from being unmounted.')
|
||||
if (hasPerformance && timingEnabled) {
|
||||
window.performance.mark('choo:renderEnd')
|
||||
window.performance.measure('choo:render', 'choo:renderStart', 'choo:renderEnd')
|
||||
|
||||
+1
-1
@@ -8,7 +8,7 @@
|
||||
"deps": "dependency-check --entry ./html.js . && dependency-check . --extra --no-dev --entry ./html.js",
|
||||
"inspect": "browserify --full-paths index -g unassertify -g uglifyify | discify --open",
|
||||
"prepublish": "npm run build",
|
||||
"start": "bankai start example --optimize",
|
||||
"start": "bankai start example",
|
||||
"test": "standard && npm run deps && node test.js"
|
||||
},
|
||||
"repository": "yoshuawuyts/choo",
|
||||
|
||||
Reference in New Issue
Block a user