Closed
Description
What version of React Router are you using?
6.11.0
Steps to Reproduce
There is a known issue in Firefox — still open after 9 years — that manifests in the following TypeError when using React Router DOM in the content scripts of a Firefox Addon:

TypeError: defaultSearchParams.keys() is not iterable[dom.ts:100:40](moz-extension://ea565e18-3799-46da-aa12-608dc044d7e7/node_modules/react-router-dom/dom.ts)
getSearchParamsForLocation dom.ts:100
Here's a link to the relevant Bugzilla ticket: https://bugzilla.mozilla.org/show_bug.cgi?id=1023984
Expected Behavior
useSearchParams
doesn't not produce an error.
Actual Behavior
React experiences a fatal error at runtime, including recursive "Invalid hook call"
warnings. This is a showstopper for anyone who wants to use React Router DOM in a web extension (for my case, paired with MemoryRouter
to simplify routing for UIs that are injected into content scripts).