Replies: 4 comments 7 replies
-
Have you tried changing the
|
Beta Was this translation helpful? Give feedback.
-
Yeah and still that doesn't pass the id parameter to the Post Component where I'll need it again.
|
Beta Was this translation helpful? Give feedback.
-
I see clearly this will be a deal breaker, thanks fro the heads up. Eventually I may have to settle down on |
Beta Was this translation helpful? Give feedback.
-
Our id's are pretty lengthy, this will give us some really lengthy and ugly urls. But We'll see how it goes. 👊🏾 |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
I'm using an api that only allows fetching data using an id BUT NOT title as follows
http://0.0.0.0:5000/blog/13b03a39-bc04-4604-baf6-059658f9f5e8
. The endpoint returns a JSON object which I want to render to browser using Next Js. However I want to have a clean url architecture that contains title as follows:instead of a url containing the id as follows:
Here's how I'm passing
props
toLink
:and here's is my
[id].js
file:I get a
router not defined error
trying to access it ingetInitialProps
. I also understand it does not pass theid
as I intend.Is it possible to achieve this? and how can I achieve it using dynamic links in Next.js ?
Beta Was this translation helpful? Give feedback.
All reactions