im trying to use redux with next14 the app dic i raped the layout file
import type { Metadata } from "next";
import { Inter } from "next/font/google";
import "./globals.css";
import { Providers } from "./providers";
const inter = Inter({ subsets: ["latin"] });
export const metadata: Metadata = {
title: "Create Next App",
description: "Generated by create next app",
};
export default function RootLayout({
children,
}: Readonly<{
children: React.ReactNode;
}>) {
return (
<html lang="en">
<body className={inter.className}>
<Providers >
{children}
</Providers>
</body>
</html>
);
}
this is the Providers
"use client"
import { Provider } from 'react-redux';
import { store } from '../store/store';
import Navbar from './components/Navbar';
export function Providers({ children }: { children: React.ReactNode }) {
return <Provider store={store}>
<Navbar />
{children}</Provider>
}
i want to use ssc but i can’t cause the Providers is a csc and i can’t use ssc in csc is there any solution
New contributor
LH Yikes is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.