2.1 Update multiple params
In 2.1
, createParam
now exports a useUpdateParams
hook, which lets you update multiple params in one function call:
import { createParam } from 'solito'
const { useUpdateParams } = createParam<{ direction: string, order: string }>()
export default function Page() {
const update = useUpdateParams()
const onPress = () => {
update({ direction: 'asc', order: 'color' })
}
}