Skip to content

A "single implementation" for both server and client in Next.js is possible, including managing cookies seamlessly across both environments.

Notifications You must be signed in to change notification settings

eungyeole/isomorphic-next

Repository files navigation

isomorphic-next

isomorphic-next is a utility library for Next.js that allows you to access cookies and headers seamlessly on both the server and client sides with the same API.

Features

  • Isomorphic Access: Provides a unified API to access cookies and headers both on the server and client sides.
  • Easy Integration: Simple to set up and integrate with your existing Next.js projects.
  • TypeScript Support: Fully typed with TypeScript for a better developer experience.

Installation

To install isomorphic-next, use npm or yarn and another package managers

npm install isomorphic-next

or

yarn add isomorphic-next

Usage

Here's a basic example of how to use isomorphic-next to access cookies and headers in your Next.js application.

Accessing Cookies

import { cookies, headers } from 'isomorphic-next/headers';

Accessing Headers

Contributing

We welcome contributions to isomorphic-next! If you have any suggestions, bug reports, or pull requests, please open an issue on our GitHub repository.

License

isomorphic-next is licensed under the MIT License. See the LICENSE file for more details.

About

A "single implementation" for both server and client in Next.js is possible, including managing cookies seamlessly across both environments.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published