TanStack / TanStack/router

fix(router-core): use configured search serializer for loader dependency keys

Open
#7,787 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
15.1k
Forks
1.9k
Avg merge
1d 20h
Merged PRs (30d)
143

Description

Problem

Custom stringifySearch is used for URL search state but not for loader dependency cache keys.

Routes using custom search serialization can therefore support values in search params that fail when used in loaderDeps.

Scope

  • Use the configured search serializer when deriving loader dependency cache keys.
  • Add a regression test using a custom serializer and a dependency value that JSON.stringify cannot handle.
  • Verify loader dependency cache identity changes when the serialized dependency value changes.

Related Work

This continues the work started in #4713:
https://github.com/TanStack/router/pull/4713

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in router-core's loader dependency cache-key derivation and its existing loader dependency tests; the issue does not name specific files or test paths. Add the regression coverage described in the scope, then verify that changing the serialized dependency changes cache identity and that the custom serializer handles the dependency value.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
frontend, web-dev
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
64/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.