Skip to content

Commit

Permalink
chore: Showcase new API
Browse files Browse the repository at this point in the history
  • Loading branch information
franky47 committed Nov 8, 2023
1 parent c012c31 commit 207240a
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions packages/playground/src/app/demos/server-side-parsing/client.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,10 @@ export function ServerSideParsingDemoClient({
'shallow',
parseAsBoolean.withDefault(true)
)
const [counter, setCounter] = useQueryState('counter', {
// Note that since the default value already has been specified,
// we can't use the .withOptions builder pattern here.
// However, we can spread and override the shallow option:
...counterParser,
shallow
})
const [counter, setCounter] = useQueryState(
'counter',
counterParser.withOptions({ shallow })
)

return (
<>
Expand Down

0 comments on commit 207240a

Please sign in to comment.