2.2.0
New features
useParams
createParam
now returns auseParams
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.