Answer the question
In order to leave comments, you need to log in
Does NextJS dynamic page rendering work only through special functions?
So far I have not found the answer to my question in the documentation itself. I am using express to manage my routing. Let's say I want to display information about the user on the page, and immediately pass the data to the component, but I don't know how to do it. Now the component render looks something like this:
router.get('/profile/user', (req, res) => {
app.render('/user'); // Путь к компоненту
});
Answer the question
In order to leave comments, you need to log in
https://nextjs.org/docs/basic-features/data-fetch...
On the server, push the data into req, you can get it from the context in the next.
You are also rendering incorrectly.
https://nextjs.org/docs/advanced-features/custom-server
https://github.com/vercel/next.js/tree/canary/exam...
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question