Socket
Socket
Sign inDemoInstall

next-client-cookies

Package Overview
Dependencies
Maintainers
1
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

next-client-cookies - npm Package Compare versions

Comparing version 1.0.0-alpha.0 to 1.0.0-alpha.1

dist/server.d.ts

7

package.json
{
"name": "next-client-cookies",
"version": "1.0.0-alpha.0",
"version": "1.0.0-alpha.1",
"description": "SSR and client support for Next.js v13 cookies (app directory)",

@@ -34,2 +34,7 @@ "keywords": [

"types": "./dist/index.d.ts"
},
"./server": {
"require": "./dist/server.js",
"import": "./dist/server.mjs",
"types": "./dist/server.d.ts"
}

@@ -36,0 +41,0 @@ },

@@ -30,2 +30,6 @@ # Next.js Client Cookies

### Within a client side component
This will work both on the client and server side for SSR.
```jsx

@@ -52,1 +56,23 @@ 'use client';

```
### Within a server only component
Will produce the same `Cookies` interfaces using Next.js's `cookies()` helper.
```jsx
import { getCookies } from 'next-client-cookies/server';
const MyComponent = () => {
const cookies = useCookies();
return (
<div>
<p>My cookie value: {cookies.get('my-cookie')}</p>
</div>
);
};
```
## License
MIT
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc