import React from 'react'; import { cookies, headers } from 'next/headers'; export default async function Component() { async function handleClick() { 'use server'; (await cookies()).set('user-id', 'encrypted-id'); } return ( <>
Name: {name} Value: {value}
); })}Name: {name} Value: {value}
); })} > ); }