"use client";
import Dashboard from "./dashboard/page";
import { useEffect } from "react";
export default function Home() {
useEffect(() => {
localStorage.setItem("Hiii", "hmm2");
console.log(localStorage.getItem("Hiii"));
localStorage.removeItem("Hiii");
console.log(localStorage.getItem("Hiii"));
}, []);
console.log("hmmm");
// return <Dashboard />;
return (
<main className="overflow-x-auto w-11/12 item-center mx-auto space-y-4"></main>
);
}
I have this code but it renders twice
As you can see, it renders two times, and is this normal behavior?
/** @type {import('next').NextConfig} */
const nextConfig = {
experimental: {
appDir: true,
reactStrictMode: false,
},
};
module.exports = nextConfig;
I also set reactStrictMode
to false
but it does not fix anything.