next.js
next.js copied to clipboard
Tutorial problem
Tutorial for fetching data gets an error when accessing http://localhost:3000/p/975 directly as tutorial recommended.
error produced: Cannot read property 'replace' of undefined
there is a miscommunication between server routing and post.getInitialprops. server routing names params.id as "title" whereas getInitialprops attempt to read context.id. Change them both to id or title, easy fix.
You tried to import or render a component that is undefined.