Skip to content

2.2.0

Compare
Choose a tag to compare
@nandorojo nandorojo released this 13 Feb 17:07
· 221 commits to master since this release

New features

useParams

  • createParam now returns a useParams hook, which lets you read and update multiple params. This closes #323.
const { useParams } = createParam<{ first: string, second: string }>()

export function App() {
  const { params, setParams } = useParams()
}

setParams shallow-merges your screen parameters with existing ones on both web and native. This matches React Navigation behavior. It will not clear out your Router.query on Next.js the way that Router.push typically does.

Bug fixes

  • Fixed #325 where next/router was imported on native.