Closed nandorojo closed 1 year ago
const [direction, setDirection] = useParam('direction') const [order, setOrder] = useParam('order') const update = () => { setOrder('price') setDirection('asc') }
On Web, this will result in only direction updating, since navigation is interruptible. There should be some way to update multiple items at once. I'm thinking a useUpdate or useBatch hook could work:
direction
useUpdate
useBatch
const { useParam, useBatch } = createParam() const batch = useBatch() batch({ order: 'price', direction: 'asc' })
Released in 2.1.
2.1
On Web, this will result in only
direction
updating, since navigation is interruptible. There should be some way to update multiple items at once. I'm thinking auseUpdate
oruseBatch
hook could work: