Author name: Dinesh

How to use React useMemo hook to improve performance

React useMemo hook One of the ways that you can improve the performance of React apps is by using the useMemo hook. This hook prevents expensive calculations from running on every render. The React useMemo takes two arguments: a function and a dependency array. useMemo( function, dependancy_array) Now, let us see how useMemo work by an […]

How to use React useMemo hook to improve performance Read More »

How to implement authentication for SSR pages & API routes in Next.js

Full-stack apps built with Next.js has three aspects of authentication: client-side authentication, server-side authentication, and API route authentication. I have discussed client-side authentication in a previous post. In this post, I will be discussing Server-side & API routes authentication in NextAuth.js. How does server-side authentication work? The browser sends a request with a user session

How to implement authentication for SSR pages & API routes in Next.js Read More »

How to set up authentication on the client-side in Next.js

Authentication in Next.js Apps falls into two broad perspectives Page authentication Client-side Server-side API route authentication Before you implement any authentication, you need to have a clear understanding of what data-fetching strategy you are going to use in your app. you can read about data-fetching strategies in the following posts. SSG, pre-rendering and getStaticProps server-side

How to set up authentication on the client-side in Next.js Read More »

Scroll to Top