MCPcopy Create free account
hub / github.com/reactjs/react-rails / enqueueCapturedUpdate

Function enqueueCapturedUpdate

lib/assets/react-source/development/react.js:15916–15936  ·  view source on GitHub ↗
(workInProgress, update)

Source from the content-addressed store, hash-verified

15914 }
15915 }
15916 function enqueueCapturedUpdate(workInProgress, update) {
15917 var current = workInProgress.alternate;
15918
15919 if (current !== null) {
15920 // Ensure the work-in-progress queue is a clone
15921 cloneUpdateQueue(current, workInProgress);
15922 } // Captured updates go only on the work-in-progress queue.
15923
15924
15925 var queue = workInProgress.updateQueue; // Append the update to the end of the list.
15926
15927 var last = queue.baseQueue;
15928
15929 if (last === null) {
15930 queue.baseQueue = update.next = update;
15931 update.next = update;
15932 } else {
15933 update.next = last.next;
15934 last.next = update;
15935 }
15936 }
15937
15938 function getStateFromUpdate(workInProgress, queue, update, prevState, nextProps, instance) {
15939 switch (update.tag) {

Callers 1

throwExceptionFunction · 0.85

Calls 1

cloneUpdateQueueFunction · 0.85

Tested by

no test coverage detected