#this metadata trouble

1 messages · Page 1 of 1 (latest)

lean yacht
barren prismBOT
#

Hi @lean yacht. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave:

lean yacht
#

whats the problem

barren prismBOT
#

Sorry @lean yacht, I seem to be having a bit of trouble. Don't worry though, I've pinged my supprt and they will try to fix me up! :technologist:

Perhaps try again in 15mins?

midnight mirage
#

i dont know why vercel does break every app by doing this

#

a lot of people use "use client"

lean yacht
#

hmm why would you want to use meta data

#

on a client component?

midnight mirage
#

cause my dev used the head.js ..

#

all the time

#

and now, my site just got empty ...

lean yacht
#

sure but im saying

#

why do u need meta data on a client component?

#

why cant it just be in a page.tsx or layout.tsx

midnight mirage
#

all my pages are clioent components

#

when i get rif of it i get errors

lean yacht
#

oh wow

#

This is bad practice tbh

#

your basically not using nextjs features at all

midnight mirage
#

?

#

im pretty sure it does haha

lean yacht
#

if u have everything set as a client component you have 0 server components

midnight mirage
#

yeah, whats wrong with it :D?

lean yacht
#

it defeats the purpose for peformance and using the app directory lmao

#

either way

midnight mirage
#

my site loads ultra quick.. that isnt the issue

lean yacht
#

thats not what im saying lol

midnight mirage
#

just i have 0 site titles, 0 metadata anymore

lean yacht
#

but either way

#

if you want to use metadata

#

I suggest creating a file next to ur page.tsx

#

like clientpage.tsx

#

or something

#

basically make it a client component

#

and have the page.tsx as a server component

#

and use the metadata in that

midnight mirage
#

how to include the client component

lean yacht
#

just like a normal component

#

import clientpage from "./clientpage"

#

your basically taking everything in ur page.tsx and putting it into a client component

#

and making ur page.tsx a server component again

#

and have the page.tsx define the metadata

midnight mirage
#

jep one second will try

#

omg finally i think it has worked

#

for non nextjs experts a nightmare experience though

lean yacht
#

lmao

#

fair

#

we on the cutting edge of development so

midnight mirage
#

yeah but they just f*** all the nextjs apps you know

#

im sure there is examples its not that easy to switch in a blink

lean yacht
#

i dont think saying

#

they just f*** all nextjs apps is accurate

#

To decompress that statement you need to understand multiple things

#

First and foremost nextjs13 app directory is literally beta. Meaning anything can change at any moment

#

its why its not stable

#

So as for the head.js it was clearly marked as deprecated and showed that going forward you shouldnt use that.

#

And because its new and beta software, also means that anyone who does choose to use it, has to deal with the consequences of unforseen bugs, aswell as breaking changes. Its the entire point of a beta software so they can test stuff out. If you wanted to continue using head.js, rollback to older versions.

#

@midnight mirage

midnight mirage
#

i get it, still bummer ya know?