useLocalSearchParams type error

Please provide the following:

  1. SDK Version: 49
  2. Platforms(Android/iOS/web/all): All / N/A
  3. Add the appropriate “Tag” based on what Expo library you have a question on. We need a tag for router.

I’m unable to set the type of search params using generics using an example almost identical with the docs.

export default function Route() {
  const local = useLocalSearchParams<{ cId: string }>();
  console.log(local.cId);
  return <Text>Test </Text>;
}

Hey @andrioid, this is a known issue, and we’re working on fixing it.

2 Likes

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.