Nextjs, What Have You Done With UseEffect?

Does the UseEffect Hook have a use in Nextjs?

Nextjs, What Have You Done With UseEffect?

I have been using Nextjs for about a year now.

There are obvious differences between React and Nextjs.

When I was working with React the UseEffect hook was one of the most useful hooks I used. Particularly if you wanted any data to be fetched from an API and loaded into your app when it is first rendered.

Nextjs introduced getStaticProps and getServerSideProps, thereby doing away with the need of UseEffect.

That got me wondering...

      Is there a use for UseEffect in Nextjs?

I would be so grateful for any resources that could help me answering this.


Thank you for reading, let's connect!

Thank you for visiting this little corner of mine. Let's connect on Twitter and LinkedIn