Answer the question
In order to leave comments, you need to log in
Passing props to nextjs?
How to pass props to a component that is rendered when passing through next/link?
The LinkUrl component to which I pass the name via props
const LinkUrl = props => {
return (
<li>
<Link href={`/post/[title]`} as={`/post/${props.title}`}>
<span>
{props.title}
</span>
</Link>
</li>
)
}
const qwe = props => {
const router = useRouter();
return (
<div>
<MyLayout>
<span>
</span>
</MyLayout>
</div>
)
}
<Link href={`/post/[title]`} as={`/post/${props.title}`} data={"props data"}>
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question