Skip to content

Commit

Permalink
Use arbitrary componentIdentity
Browse files Browse the repository at this point in the history
There was no particular reason it was set to element.type. We just wanted to check if something is a render phase update.
  • Loading branch information
gaearon committed Mar 15, 2019
1 parent 8d6a4e5 commit 2e4d021
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/react-test-renderer/src/ReactShallowRenderer.js
Original file line number Diff line number Diff line change
Expand Up @@ -560,7 +560,8 @@ class ReactShallowRenderer {
} else {
const prevDispatcher = ReactCurrentDispatcher.current;
ReactCurrentDispatcher.current = this._dispatcher;
this._prepareToUseHooks(element.type);
const componentIdentity = {};
this._prepareToUseHooks(componentIdentity);
try {
if (isForwardRef(element)) {
this._rendered = element.type.render(element.props, element.ref);
Expand Down

0 comments on commit 2e4d021

Please sign in to comment.