TanStackT
TanStack15mo ago
3 replies
brilliant-lime

Optimize complex searchParams update handling Task

Initial Investigation

I started investigating the setTimeout with pendingMs = 0 usage, thinking it could be removed.

- The complexity comes from the searchParams update handling logic itself, not from the timeout

Questions

1. Is there a way to optimize the current Task implementation?
2. Could we split this Task into smaller, more focused tasks?
3. Are all the current operations in the Task necessary for every searchParams update?

https://github.com/TanStack/router/discussions/2717
GitHub
I noticed that even with pendingMs: 0, shouldPending is still true. Is this the expected behavior? router/packages/react-router/src/router.ts Line 2167 in 581ebe3 const shouldPending = !!(
PendingMs 0 and shouldPending true · TanStack router · Discussion #...
Was this page helpful?