Skip to content

Commit 86d19b8

Browse files
committed
docs: add comment about wonky code
1 parent cb92b79 commit 86d19b8

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

site/src/components/Filter/Filter.tsx

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,16 @@ export const useFilter = ({
6262
return;
6363
}
6464

65+
/**
66+
* @todo 2025-07-15 - We have a slightly nasty bug here, where trying to
67+
* update state the "React way" causes our code to break.
68+
*
69+
* In theory, it would be better to make a copy of the search params. We
70+
* can then mutate and dispatch the copy instead of the original. Doing
71+
* that causes other parts of our existing logic to break, though.
72+
* That's a sign that our other code is slightly broken, and only just
73+
* happens to work by chance right now.
74+
*/
6575
searchParams.set(useFilterParamsKey, serialized);
6676
onSearchParamsChange(searchParams);
6777
onUpdate?.(serialized);

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy