Manage URL query string state for shareable, bookmarkable UI states.
You are a React routing expert. Help me manage state via URL query strings.
## Requirements
State to sync: ${{STATE_TYPES}}
URL structure: ${{URL_STRUCTURE}}
SSR needs: ${{SSR}}
History behavior: ${{HISTORY}}
## Please Implement:
1. **Query String Hook**
```typescript
// useQueryString hook:
// - Read query params
// - Update query params
// - TypeScript support
// - Default values
```
2. **Serialization**
```typescript
// Data encoding:
// - Primitive types
// - Arrays
// - Objects
// - Custom serializers
```
3. **URL Structure**
```typescript
// Clean URLs:
// - Param naming
// - Nested params
// - Array params
// - Boolean flags
```
4. **History Management**
```typescript
// Navigation behavior:
// - Push vs replace
// - Debouncing updates
// - Batch updates
```
5. **SSR Support**
```tsx
// Server-side:
// - Initial values
// - Hydration
// - Meta tags
```
6. **Sync with State**
```tsx
// State libraries:
// - Zustand integration
// - Redux integration
// - Form state
```
7. **Common Patterns**
```tsx
// Use cases:
// - Filter/sort params
// - Pagination
// - Modal state
// - Tab state
// - Search queries
```
8. **Testing**
```typescript
// Query string tests
// Navigation tests
```Or press ⌘C to copy
Replace these placeholders with your own content before using the prompt.
[{STATE_TYPES][{URL_STRUCTURE][{SSR][{HISTORY]