If we have a dynamic route
[id].js
function id() {
return <h1>Hello World</h1>
}
export default id
and we build the static pages with npm run build, the result is the [id].html page. Any route with /something will work and displays Hello World.
But if we generate the content of the page dynamically by using the return value of getStaticProps() in the component:
function id(props) {
const { test } = props
return <h1>{test.foo}</h1>
}
export default id
Then we need getStaticPaths() again to specify the possible routes.
Why do we only need getStaticPaths() when we use getStaticProps?