score:0

<Link route='blog' params={{id: data.id}}>
<a>Hello world</a>
</Link>

score:1

Article.getInitialProps = async (router) => {
    //get id query parameter
    const res = await getBlog(`${router.query.id}`);
    const json = await res.json();
    console.log(json);

    return { blog: json };
};

score:1

 Article.getInitialProps = async function(context) => {
    const res = await getBlog(`${context.query.id}`);
    const json = await res.json();
    console.log(json);

    return { blog: json };
};

Related Query

More Query from same tag