Hello, {name || 'anonymous visitor'}!
> ) } ``` -------------------------------- ### Unit Test Component with useQueryState Source: https://github.com/47ng/nuqs/blob/next/README.md Utilize the `NuqsTestingAdapter` with Testing Library and Vitest to unit test components using `useQueryState` or `useQueryStates` in isolation. Provide initial search parameters and a callback for URL updates. ```tsx import { render, screen } from '@testing-library/react' import userEvent from '@testing-library/user-event' import { NuqsTestingAdapter, type UrlUpdateEvent } from 'nuqs/adapters/testing' import { describe, expect, it, vi } from 'vitest' import { CounterButton } from './counter-button' it('should increment the count when clicked', async () => { const user = userEvent.setup() const onUrlUpdate = vi.fn<[UrlUpdateEvent]>() render(