error using slots
Answered
Philadelphia Vireo posted this in #help-forum
Philadelphia VireoOP
export default function Layout({
children,
setting,
notification,
}: {
children: React.ReactNode;
setting: React.ReactNode;
notification: React.ReactNode;
}) {
console.log(notification);
return (
#Unknown Channel
{children}
{setting}
{notification}
</>
)
}
my layout.tsx file for dash folder
only one slot is getting rendered, the one which is at the top of the directories/the one which is created first
all the other props are not rendering
and on console logging any slot other than the one rendering, it shows undefined on console
all the naming and the render functions in the page.tsx are correct
still whats the issue?
children,
setting,
notification,
}: {
children: React.ReactNode;
setting: React.ReactNode;
notification: React.ReactNode;
}) {
console.log(notification);
return (
#Unknown Channel
{children}
{setting}
{notification}
</>
)
}
my layout.tsx file for dash folder
only one slot is getting rendered, the one which is at the top of the directories/the one which is created first
all the other props are not rendering
and on console logging any slot other than the one rendering, it shows undefined on console
all the naming and the render functions in the page.tsx are correct
still whats the issue?
9 Replies
Philadelphia VireoOP
okk thanks
now its workingðŸ‘
now its workingðŸ‘
but why do i need to restart the server after creating every slot?
otherwise the newly added slots are not working
even i hard refresh the page right from the home route, still restarting the server is needed!!>
@Philadelphia Vireo but why do i need to restart the server after creating every slot?
It is buggy when creating slot atm
Sometimes need to remove .next folder and let next regenerate the file
Philadelphia VireoOP
ðŸ«
okkk bruhhðŸ‘
thankss
thankss