Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

No, it is not possible to export data using getStaticProps() in Next.js as it is a function that runs at build-time and cannot be executed on the client-side. Its main purpose is to pre-render the page with the data fetched from an external API or database. However, you can use getServerSideProps() or client-side fetching using useEffect() or useState() hook to export data.