Skip to content

Commit ef83373

Browse files
committed
Reduce allocations in hot path by reusing the stash
Since performUnitOfWork() is not reentrant, it should be safe to reuse the same stash every time instead of creating a new object.
1 parent 0f15512 commit ef83373

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/react-reconciler/src/ReactFiberScheduler.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -791,7 +791,7 @@ export default function<T, P, I, TI, HI, PI, C, CC, CX, PL>(
791791

792792
if (__DEV__ && replayFailedUnitOfWorkWithInvokeGuardedCallback) {
793793
stashedWorkInProgressProperties = assignFiberPropertiesInDEV(
794-
null,
794+
stashedWorkInProgressProperties,
795795
workInProgress,
796796
);
797797
}

0 commit comments

Comments
 (0)