1. dispatchAction

// reconciler > ReactFiberHooks.js
function dispatchAction(...) {
	if (...) {
		/* Render phase Update ... */
	} else {
		/* idle update ... */
		scheduleWork(fiber, expirationTime);
	}
}

scheduleWork

2-1 expirationTime 새기기

// reconciler > ReactFiberWorkLoop.js
export function scheduleUpdateOnFiber(fiber, expirationTime) {
	const root = markUpdateTimeFromFiberToRoot(fiber, expirationTime)
}

export const scheduleWork = scheduleUpdateOnFiber;
// reconciler > ReactFiberWorkLoop.js
function markUpdateTimeFromFiberToRoot(fiber, expirationTime) {
	// expirationTime을 새긴다
	if (fiber.expirationTime < expirationTime) {
		fiber.expirationTime = expirationTime
	}
	let alternate = fiber.alternate
	if (alternate !== null && alternate.expirationTime < expirationTime) {
		alternate.expirationTime = expirationTime
	}

	// root를 찾는다
	let node = fiber.return
	let root = null
	if (node !== null && fiber.tag === HostRoot) {
		root = fiber.stateNode // Host root의 stateNode가 root이다.
	} else {
		while (node !== null) {
			alternate = node.alternate
			// childExpirationTime을 새긴다
			if (node.childExpirationTime < expirationTime) {
				node.childExpirationTime = expirationTime
				if (
					alternate !== null &&
					alternate.childExpirationTime < expirationTime
				) {
					alternate.childExpirationTime = expirationTime
				}
			} else if (
				alternate !== null &&
				alternate.childExpirationTime < expirationTime
			) {
				alternate.childExpirationTime = expirationTime
			}

			if (node.return === null && node.tag === HostRoot) {
				root = node.stateNode
				break
			}
			node = node.return
		}
	}

	return root
}