Dynamic metadata
Unanswered
Cuban Crocodile posted this in #help-forum
Cuban CrocodileOP
What should I do if I generate dynamic metadata for dynamic route? I'm talking about situation where I use notFound() function in my page function. Should I move notFound() function to the function that generate metadata or keep it in my page function and return empty metadata object from generateMetadata function?
2 Replies
Unfortunately, I'm unable to understand your query
@Cuban Crocodile What should I do if I generate dynamic metadata for dynamic route? I'm talking about situation where I use notFound() function in my page function. Should I move notFound() function to the function that generate metadata or keep it in my page function and return empty metadata object from generateMetadata function?
when notFound is run, whatever returned in the metadata function doesnt matter anyway, so yeah thats what i'd do. notFound in main component, returning empty in generateMetadata