In Vue.js, the mounted lifecycle hook is one of the lifecycle hooks provided by the framework. Lifecycle hooks are special methods that allow you to perform actions at different stages of a Vue component’s lifecycle. The mounted hook is called after the Vue instance has been mounted, i.e., the component has been inserted into the… Continue reading Mounted Feature in the vue.js.
Author: Jerin
Differences between VueX and Pinia in vue ?
VueX and Pinia are both state management solutions for Vue.js applications, but they have some differences in their approaches and implementations. VueX: Centralized State Management: VueX provides a centralized state management pattern. It includes a single store that holds the global state for the entire application. Mutations and Actions: It uses mutations to directly mutate… Continue reading Differences between VueX and Pinia in vue ?
What is a watcher in vuejs?
When building components in Vue, we often need to respond to changes in our props. A watcher — or watched prop — let’s us track a property on our component and run a function whenever it changes. For example, if the prop colour changes, we can decide to log something to the console: export default { name: ‘ColourChange’, props: [‘colour’], watch:… Continue reading What is a watcher in vuejs?
How to use Quill as a rich text editor in next.js
Install Quill We will use the react-quill package : npm install react-quill import the css of react-quill in _app.js import ‘react-quill/dist/quill.snow.css’ Dynamically import Quill we import react-quill dynamically, to avoid including it in server-side and we will render a loading state while the dynamic component is being loaded. const QuillNoSSRWrapper = dynamic(import(‘react-quill’), { ssr: false,… Continue reading How to use Quill as a rich text editor in next.js
Usage of react-datepicker in Next.js:
react-datepicker is a lightweight library with a lot of features. To build a simple React date picker, all you need to do is import the custom component and set two props. Installation: npm install react-datepicker Component Creation: Create a new component file, e.g., DatePickerComponent.js. Import necessary dependencies (React, useState) and DatePicker from react-datepicker. Set up… Continue reading Usage of react-datepicker in Next.js:
key features of useEffect hook in React component
Purpose: useEffect is a React hook used for handling side effects in functional components. Side effects can include data fetching, subscriptions, DOM manipulations, and more. Functionality: It allows performing operations after the component renders or when certain dependencies change. Syntax: It takes two arguments: a function and an optional dependency array. Function Argument: Contains the… Continue reading key features of useEffect hook in React component
Registering Lifecycle Hooks vue.js
The onMounted hook can be used to run code after the component has finished the initial rendering and created the DOM nodes: vue <script setup> import { onMounted } from ‘vue’ onMounted(() => { console.log(`the component is now mounted.`) }) </script> There are also other hooks which will be called at different stages of the instance’s lifecycle,… Continue reading Registering Lifecycle Hooks vue.js
Getting GLIBC_2.28 not foundd
I running node -v command getting error:- node: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.28? not found (required by node) sudo apt-get remove nodejs nvm install 16.15.1 node v16.15.1 version and npm v16.15.1 is installed. For same make sure nvm is installed in your machine.
NetworkManager service
For Linux Mint, which is based on Ubuntu, the NetworkManager service is commonly used to manage network connections. You can restart the NetworkManager service using the following command: This command will attempt to restart the NetworkManager service responsible for managing your network connections in Linux Mint. If for some reason the NetworkManager service is not… Continue reading NetworkManager service
props in nexjs
In Next.js, props refer to the properties that are passed to a React component when it’s rendered. These properties hold data or functions that can be utilized within the component. In the context of Next.js, when you define a page or a component and you want to pass data or functions to that component from… Continue reading props in nexjs