-
-
Notifications
You must be signed in to change notification settings - Fork 180
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
useSearchParams
crashing on react native app
#472
Comments
Here is a log from when the route has a query param present: It appears react navigation is using the |
For anyone else needing a workaround:
|
I think Solito should actually just ignore this error |
Also I would not call your join safe since it breaks the rules of hooks and could throw in production since Params are dynamic |
Is there an existing issue for this?
Do you want this issue prioritized?
Current Behavior
I have a component that is rendering as a part of
_layout.tsx
for a given route. This component usesuseSearchParams
, which causes the error shown in the attached screenshot. I have logged the value ofparams
from the underling react navigation route, which is what the solito source is referencing, and it is{"screen":"index","params":{}}
, which seems quite odd. I am doing this exact same thing from a component that is rendered byindex.ts
on the same route, and it does not have the same issue. It also works fine in the web app. There does not seem to be a workaround for this.Expected Behavior
No response
Steps To Reproduce
Call
useSearchParams
from a component rendered by_layout.tsx.
Versions
Screenshots
Reproduction
No response
The text was updated successfully, but these errors were encountered: