SWR shows data undefined at first render
I am trying to get used to Next.js’ version. Before I was using getServerSideProps and sending the data to client side so I was getting the data at first render without seeing undefined. I didn’t understand how to achieve the same thing in the latest version.
Here is my code: