From f416d72d0b5dd5e1b926dc315d41ab5cabdb452a Mon Sep 17 00:00:00 2001 From: brinkokevin Date: Fri, 4 Jul 2025 10:38:15 +0200 Subject: [PATCH] Fix queue buildup on unchanged state --- modules/react-reconciler/src/ReactFiberHooks.new.luau | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/modules/react-reconciler/src/ReactFiberHooks.new.luau b/modules/react-reconciler/src/ReactFiberHooks.new.luau index f03211d3..211a0005 100644 --- a/modules/react-reconciler/src/ReactFiberHooks.new.luau +++ b/modules/react-reconciler/src/ReactFiberHooks.new.luau @@ -1870,6 +1870,12 @@ function dispatchAction(fiber: Fiber, queue: UpdateQueue, action: A, -- It's still possible that we'll need to rebase this update later, -- if the component re-renders for a different reason and by that -- time the reducer has changed. + if pending == nil then + queue.pending = nil + else + pending.next = update.next + queue.pending = pending + end return end -- ROBLOX catch