JS frameworks & libraries

Topics on JavaScript frameworks such as React, Next.js,MERN stack, and any other technology based on JavaScript

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 »

A simple & clear guide to On-Demand ISR in Next.js

What is on-demand ISR? On-demand ISR is a new feature added to the existing incremental static regeneration ( ISR ) in Next.js. Using ISR developers can reduce build-time in SSG. And most importantly, updating the cache periodically at a previously specified interval can resolve the issue of showing stale data on web pages. Although ISR …

A simple & clear guide to On-Demand ISR in Next.js Read More »

How to use useSWR for client-side data fetching in Next.js

Client-side data fetching When there is a web page that shows user-specific data that does not need any optimization for SEO client-side data fetching is the way to go. In Next.js, just as in React.js, you can use the useEffect hook with async functions to fetch data and the useState hook to display them in …

How to use useSWR for client-side data fetching in Next.js Read More »

The Ultimate Guide To Incremental Static Regeneration ( ISR ) in Next.js

Incremental Static Regeneration ( ISR ) is relatively a new feature in Next.js. It is immensely helpful for a developer, and greatly improves the performance of web applications. You need to have an understanding of getStaticProps and getstaticPaths to have a clear idea of ISR. Why do we need Incremental Static Regeneration? With SSG, the …

The Ultimate Guide To Incremental Static Regeneration ( ISR ) in Next.js Read More »

How to use getStaticPaths on dynamic routes in Next.js

What is getStaticPaths? getStaticPaths is another special function in Next.js used in conjunction with getStaticProps for dynamic routes. In other words, you can use getStaticPaths on a page that uses a dynamic route, and whenever you use this function on that page, there must be a getStaticProps function as well. [sample].js What is a Master-Detail …

How to use getStaticPaths on dynamic routes in Next.js Read More »

What do you know about pre-rendering, SSG,& getStaticProps in Next.js?

What is pre-rendering? Next.js official documents say that Next.js, by default, pre-renders every page in the application. What does that really mean? It means that the web page that you see on the browser receives to the browser as an HTML page with minimal javascript required to add interactivity to each HTML page. A user …

What do you know about pre-rendering, SSG,& getStaticProps in Next.js? Read More »

Learn Next.js setting up & routing in no time

What is Next.js? Next.js is a production-ready React Framework. What does this really mean? if you are familiar with React, you know that you can not use React alone for production-ready applications. You need to add other supporting libraries as your web application or web design project requires. React is a library that is responsible …

Learn Next.js setting up & routing in no time Read More »

Scroll to Top