These three dots are called the spread syntax or spread operator. The spread syntax is a feature of ES6, and it’s also used in React. Spread syntax allows you to deconstruct an array or object into separate variables. Even though the syntax doesn’t look particularly meaningful when you first encounter it, spread syntax is super useful. Spread syntax (…) allows an… Continue reading Spread Operator in React
Author: Jerin
Difference between parseISO(string) and new Date(string)?
The difference lies in the way they handle parsing of date strings and in their behavior regarding the interpretation of time zones. parseISO(string): This function is typically used in libraries like date-fns for parsing ISO 8601 formatted strings into JavaScript Date objects. ISO 8601 format includes the date and time in a standardized format. parseISO… Continue reading Difference between parseISO(string) and new Date(string)?
What’s New in Next.js 14.1: ?
Improved Self-Hosting: New documentation and custom cache handler. Turbopack Improvements: 5,600 tests passing for next dev –turbo. DX Improvements: Improved error messages, pushState and replaceState support. Parallel & Intercepted Routes: 20 bug fixes based on your feedback. Improved Self-Hosting We’ve heard your feedback for improved clarity on how to self-host Next.js with a Node.js server,… Continue reading What’s New in Next.js 14.1: ?
What is useEffect hook in React?
useEffect hook The useEffect in ReactJS is used to handle the side effects such as fetching data and updating DOM. This hook runs on every render but there is also a way of using a dependency array using which we can control the effect of rendering Why choose useEffect hook? useEffect hook is used… Continue reading What is useEffect hook in React?
What’s the purpose of if (typeof window !== ‘undefined’) in Nextjs?
The if (typeof window !== ‘undefined’) check is a common pattern in JavaScript, especially in the context of web development with libraries like React and Next.js. This condition is used to determine whether the code is running in a browser environment or on the server. Here’s an explanation of how it works: typeof window: The… Continue reading What’s the purpose of if (typeof window !== ‘undefined’) in Nextjs?
Steps to Upgrading Linux Mint 21 from 20.
Check your Linux Mint version and ensure that you are using Mint 20.3. You cannot upgrade to Mint 21 from Mint 20.1 or 20..2. Step 1: Update your system by installing any available updates Launch the Update Manager with Menu -> Administration -> Update Manager. Check if there are any package updates available. If yes,… Continue reading Steps to Upgrading Linux Mint 21 from 20.
Image compression libraries in Next.js
Next.js itself does not provide specific image compression libraries, as it’s more focused on server-side rendering, routing, and other aspects of web development. However, you can use third-party libraries within your Next.js project for image compression. Here are a few popular JavaScript libraries for image compression: image-size: A simple library to get the dimensions of… Continue reading Image compression libraries in Next.js
Category Hierarchy Display
Not valid content,for testing Purpose Category Hierarchy Display Verify that the LHS of the PLP page displays the category hierarchy as per the design. Ensure that the hierarchy is clear, with parent and child categories distinguishable. Price Range Display Confirm the price range is visible on the LHS of the PLP page as per the… Continue reading Category Hierarchy Display
Install Node.js 20.0.0 version with nvm.
Install nvm: Open a terminal. Run the following command to install nvm: Copy code curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.1/install.sh | bash This command installs nvm using the installation script from the official GitHub repository. If you encounter any issues or if the version has been updated, please check the nvm GitHub repository for the latest installation instructions.… Continue reading Install Node.js 20.0.0 version with nvm.
Methods and Event Handling in Vue.js
In Vue.js, methods are functions defined within the methods option of a component. They provide a way to encapsulate logic and functionality that can be called in response to events or other triggers. https://v1.vuejs.org/guide/events.html