wrapping the layout.js in next 14 project using zustand createContext. Still I am not able to use store and its state in server side component of next js 14 #2313
Unanswered
sandeepbfnp
asked this question in
Bug report
Replies: 1 comment
-
|
You can't use it the same as you can't use |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
wrapping the layout.js in next 14 project using zustand createContext. Still I am not able to use store and its state in server side component of next js 14.
/app/layout.jsx
import type { Metadata } from "next";
import { Inter } from "next/font/google";
import "./globals.css";
import Header from "@/components/header";
import ZustandProvider from "../hydrationZustand";
const inter = Inter({ subsets: ["latin"] });
export const metadata: Metadata = {
title: "Create Next App",
description: "Generated by create next app",
};
export default function RootLayout({
children,
}: {
children: React.ReactNode;
}) {
return (
{children}
);
}
after this i am not able to use the store in my /app/page.jsx
giving error of using useStore in server components
Beta Was this translation helpful? Give feedback.
All reactions