[Fiber] Make bad element type message same as in Stack (#8460)

* Make bad element type message same as in Stack

This makes Fiber emit the same message as Stack (aside from the missing owner information).

* Add a separate test verifying error includes owner name

Fiber currently doesn't pass it. This is just to keep track of it as a todo.
This commit is contained in:
Dan Abramov
2016-11-30 16:29:42 +00:00
committed by GitHub
parent a8a9a32b63
commit 6fa4dc8fbf
4 changed files with 29 additions and 2 deletions
+1 -1
View File
@@ -83,7 +83,7 @@ src/renderers/shared/hooks/__tests__/ReactHostOperationHistoryHook-test.js
src/renderers/shared/shared/__tests__/ReactComponent-test.js
* should throw on invalid render targets
* throws usefully when rendering badly-typed elements
* includes owner name in the error about badly-typed elements
src/renderers/shared/shared/__tests__/ReactComponentLifeCycle-test.js
* should carry through each of the phases of setup
+1
View File
@@ -1221,6 +1221,7 @@ src/renderers/shared/shared/__tests__/ReactComponent-test.js
* should support new-style refs with mixed-up owners
* should call refs at the correct time
* fires the callback after a component is rendered
* throws usefully when rendering badly-typed elements
src/renderers/shared/shared/__tests__/ReactComponentLifeCycle-test.js
* should not reuse an instance when it has been unmounted