API Reference (Overview)
The Intrig Next.js SDK provides a comprehensive set of building blocks for integrating your full-stack application with backend APIs. These APIs fall into three main groups:
- Server-Side Functions – Direct backend access for API routes and server components without client-side overhead.
- Client-Side Hooks – React hooks optimized for Next.js hydration and SSR scenarios.
- Providers and Utilities – Core pieces that establish configuration and manage state across server and client boundaries.
At a high level, you'll work with:
-
Server-Side Functions – Async functions that run in API routes and server components:
- Learn how to use both high-level action functions and lower-level execute functions in one place: Server Functions
-
Client-Side Hooks – React hooks for client-side state management:
- Stateful Hook caches results and handles hydration seamlessly. See: Stateful Hook
- Stateless Hook performs one-off operations without caching. See: Stateless Hook
- Download Hook simplifies file downloads with progress tracking. See: Download Hook
-
Providers and State – Configuration and state management:
- IntrigLayout sets up global configuration and automatic hydration for Next.js apps. See: IntrigLayout
- NetworkState manages the lifecycle of async requests with hydration support. See: Network State
- Middleware enhances Next.js middleware with Intrig capabilities. See: Middleware
- Status Helpers quick helpers to check request state: isSuccess, isError, isPending, isInit
Together, these components let you build full-stack Next.js applications with minimal boilerplate while maintaining type safety and consistency between server and client environments.