#`app/page.tsx` is not loading

14 messages · Page 1 of 1 (latest)

pearl ether
#

I have a folder structure as follows

- app
    - layout.tsx
    - page.tsx (client component)
    - directory
        - page.tsx

Next is loading
app/layout.tsx > app/directory/page.tsx

instead of
app/layout.tsx > app/page.tsx > app/directory/page.tsx

wise geodeBOT
#

🔎 This post has been indexed in our web forum and will be seen by search engines so other users can find it outside Discord

🕵️ Your user profile is private by default and won't be visible to users outside Discord, if you want to be visible in the web forum you can add the "Public Profile" role in id:customize

✅ You can mark a message as the answer for your post with Right click -> Apps -> Mark Solution
(if you don't see the option, try refreshing Discord with Ctrl + R)

pearl ether
#

What seems to be the issue?

#

Ive tried clearing cache as well

lavish fractal
#

it is correct, what is your problem?

pearl ether
lavish fractal
#

app/page.tsx shouldn't be loaded when opening /directory, page is not layout

pearl ether
#

its skipping directly to app/directory/page.tsx

lavish fractal
#

Have you read the docs? I don't sure what is your definition of "load", but if you are referring to "render", it is an expected behaviour

pearl ether
#

Ahh, i made a silly mistake

#

thank you for pointing it out!

pearl ether
lavish fractal
#

You can have client components in a server component, just create the component and put it into your root layout.