Covers the essentials for integrating Algolia's search into React and Next.js apps. You get patterns for the modern hooks-based InstantSearch setup, SSR configuration for Next.js (including the tricky bits around dynamic rendering and routing), and solid indexing strategies to keep your data synced without killing performance. The batching guidance is practical: 10MB or 1K-10K records per batch, prefer partial updates over full reindexing. Useful if you're implementing search functionality and want to avoid the common pitfalls around SSR state management and expensive delete operations. The sharp edges table exists but unfortunately has no details filled in.

skills.sh installs
211
GitHub stars
33.2K
last updated
Aug 21, 2026

Install

$ npx -y skills add davila7/claude-code-templates --skill algolia-search --agent claude-code

Installs into .claude/skills of the current project.

Files

Algolia Search Integration

Patterns

React InstantSearch with Hooks

Modern React InstantSearch setup using hooks for type-ahead search.

Uses react-instantsearch-hooks-web package with algoliasearch client. Widgets are components that can be customized with classnames.

Key hooks:

  • useSearchBox: Search input handling
  • useHits: Access search results
  • useRefinementList: Facet filtering
  • usePagination: Result pagination
  • useInstantSearch: Full state access

Next.js Server-Side Rendering

SSR integration for Next.js with react-instantsearch-nextjs package.

Use instead of for SSR. Supports both Pages Router and App Router (experimental).

Key considerations:

  • Set dynamic = 'force-dynamic' for fresh results
  • Handle URL synchronization with routing prop
  • Use getServerState for initial state

Data Synchronization and Indexing

Indexing strategies for keeping Algolia in sync with your data.

Three main approaches:

  1. Full Reindexing - Replace entire index (expensive)
  2. Full Record Updates - Replace individual records
  3. Partial Updates - Update specific attributes only

Sponsors

Details

Repository
github.com/davila7/claude-code-templates
Categories
Frontend Development, Backend & APIs
First seen
Jun 3, 2026

More from davila7/claude-code-templates

All 618
1s-hiraoku avatarjotai-experts-hiraoku/skills-factoryExpert guidance for Jotai state management in React applications. Provides best practices, performance optimization, and architectural patterns. Use when design204skills.sh installs
2jezweb avatartesting-libraryjezweb/claude-skillsTest React components with Testing Library patterns. Covers queries (getBy/findBy/queryBy), user-event interactions, async testing (findBy vs waitFor), accessib203skills.sh installs
3dbjpanda avatarconvex-tenantsdbjpanda/convex-tenantsMulti-tenant organization and team management for Convex with @djpanda/convex-tenants and @djpanda/convex-authz. Use when (1) setting up or integrating multi-te192skills.sh installs
4warpdotdev avatarwebapp-testingwarpdotdev/oz-skillsTest local web applications with Playwright. Use when asked to verify frontend functionality, debug UI behavior, capture browser screenshots, or inspect browser192skills.sh installs
5qodex-ai avataraesthetic-analysisqodex-ai/ai-agent-skillsAnalyze and extract design patterns from visual examples. Deconstructs design systems, color palettes, typography, and layout principles from reference material190skills.sh installs
6davila7 avatarplaywrightdavila7/claude-code-templatesUse when the task requires automating a real browser from the terminal (navigation, form filling, snapshots, screenshots, data extraction, UI-flow debugging) vi185skills.sh installs