aint fast-reloading[closed]
Answered
Auth posted this in #help-forum
AuthOP
so i made a new project and changed layout tsx and made a folder in src which is sidebar i added sidebar in layout and now ive to restart everytime to reload and i dont see any errors
24 Replies
AuthOP
import "./globals.css";
import { Sidebar } from "@/components/sidebar";
export default function RootLayout({
children,
}: Readonly<{
children: React.ReactNode;
}>) {
return (
<div>
<Sidebar />
{children}
</div>
);
} this is layout.tsxoh now some errors came
sidebar.tsx -
import React from 'react'
export const Sidebar = () => {
return (
<>
<aside className="bg-black p-4">
<div className="flex flex-col">
<a href="#" className="mb-2">Meow</a>
<a href="#" className="mb-2">Meow</a>
<a href="#" className="mb-2">Meow</a>
<a href="#" className="mb-2">Meow</a>
<a href="#" className="mb-2">Meow</a>
<a href="#" className="mb-2">Meow</a>
</div>
</aside>
</>
)
} i was just starting to makeare you using the router anywhere @Auth
wait its an issue with your layout
@Arinji are you using the router anywhere <@1045909242101633126>
AuthOP
lmao i deleted
and reinstalled
your layout needs to have a body and html tag
Answer
AuthOP
and it worked
@Arinji your layout needs to have a body and html tag
AuthOP
alright ill keep in mind
yup, if it happens again, thats the fix :D
i dont get why reinstalling worked tbh
is your layout code the same?
@Arinji i dont get why reinstalling worked tbh
AuthOP
reinstalling i mean
i deleted all files
then
npx create-next-app@latest
i was just starting so it wasnt much of a pain
@Auth sidebar.tsx - tsx
import React from 'react'
export const Sidebar = () => {
return (
<>
<aside className="bg-black p-4">
<div className="flex flex-col">
<a href="#" className="mb-2">Meow</a>
<a href="#" className="mb-2">Meow</a>
<a href="#" className="mb-2">Meow</a>
<a href="#" className="mb-2">Meow</a>
<a href="#" className="mb-2">Meow</a>
<a href="#" className="mb-2">Meow</a>
</div>
</aside>
</>
)
}
i was just starting to make
AuthOP
this was my first code
oh kk
@Arinji your layout needs to have a body and html tag
mark this as the ans btw :D
AuthOP
alr