Isomorphic Next

Quick Start

Get started with isomorphic-next in minutes

Quick Start

Installation

Choose your preferred package manager to install isomorphic-next:

# Using npm
npm install isomorphic-next
 
# Using yarn
yarn add isomorphic-next
 
# Using pnpm
pnpm add isomorphic-next

Basic Usage

1. Manage Cookies

Client Components

"use client";
import { cookies } from "isomorphic-next/headers";
 
function ClientComponent() {
  // Use cookies here
  const cookieValue = cookies().get("sidebarOpen");
 
  return <>{cookieValue}</>;
}

Server Components

import { cookies } from "isomorphic-next/cookies";
 
function ServerComponent() {
  // Use cookies here
  const cookieValue = cookies().get("sidebarOpen");
 
  return <>{cookieValue}</>;
}

Next Steps

On this page