Is useSearchParams
memoized?
#8731
Unanswered
BrianMcBrayer
asked this question in
Q&A
Replies: 1 comment
-
I... think(?) I have found the answer, and it is "no, it is not memoized". My example code:
This logs |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello,
Thank you for react router!
I am curious if the result of
useSearchParams
is stable (memoized between renders)? In other words, if the search params haven't changed between renders, will this return the same object, so it can be used in auseEffect
oruseCallback
dependency list?Thanks!
-Brian
Beta Was this translation helpful? Give feedback.
All reactions