Skip to content

Commit

Permalink
chore: Try to avoid bursting e2e-next CI caching (#859)
Browse files Browse the repository at this point in the history
  • Loading branch information
franky47 authored Jan 14, 2025
1 parent 4036594 commit ff5e641
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/ci-cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ jobs:
run: pnpm install --frozen-lockfile ${{ matrix.next-version != 'latest' && '--filter e2e-next...' || '' }}
- name: Install Next.js version ${{ matrix.next-version }}
if: ${{ matrix.next-version != 'local' }}
run: pnpm add --filter e2e-next --filter nuqs next@${{ matrix.next-version }}
run: pnpm add --filter e2e-next next@${{ matrix.next-version }}
- name: Run integration tests
run: pnpm run test ${{ github.event_name == 'workflow_dispatch' && '--force' || '' }} --filter e2e-next
env:
Expand Down
19 changes: 19 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -622,6 +622,25 @@ const search = await setCoordinates({
})
```

## Loaders

To parse search params as a one-off operation, you can use a **loader function**:

```tsx
import { createLoader } from 'nuqs' // or 'nuqs/server'
const searchParams = {
q: parseAsString,
page: parseAsInteger.withDefault(1)
}

const loadSearchParams = createLoader(searchParams)

const { q, page } = loadSearchParams('?q=hello&page=2')
```

It accepts various types of inputs (strings, URL, URLSearchParams, Request, Promises, etc.). [Read more](https://nuqs.47ng.com/docs/server-side#loaders)

## Accessing searchParams in Server Components

If you wish to access the searchParams in a deeply nested Server Component
Expand Down

0 comments on commit ff5e641

Please sign in to comment.