8.

What is the purpose of the getStaticProps function in Next.js?

It configures the routing for the component.

It sets up server-side rendering for the component.

It fetches data at runtime and passes it as props to the component.

It fetches data at build time and passes it as props to the component.