[slug].jsfile naming convention. For example, if you want to create dynamic blog post pages, you can create a file named
pagesdirectory and use the
getStaticPropsfunctions to fetch and render data.
getInitialPropsfunction in Next.js?
getInitialPropsis a special function you can use in a page component to fetch data before rendering the page. It’s often used for server-side rendering or data fetching in traditional client-side routing.
_app.jsfile in Next.js?
_app.jsfile is a special file in Next.js that allows you to customize the wrapper component that surrounds all pages. It’s useful for adding global styles, state management, and other common functionality.
Remember, these answers are meant to provide a general overview. It’s a good idea questions during your interview .