Ravi Tokas

React JS DOM and Virtual DOM

All About ReactJS Virtual DOM

ReactJS Virtual DOM revolutionizes frontend development by introducing a lightweight, efficient abstraction of the browser’s DOM. This virtual representation mirrors the actual DOM, enabling React to efficiently update and render components in response to state changes. By comparing the virtual DOM with the real DOM and selectively applying changes, React minimizes unnecessary re-renders, enhancing performance and […]

All About ReactJS Virtual DOM Read More »

Next JS

How to make a Blog detail page with data fetch from mongoDB in nextJS

To fetch a blog detail page data by ID from MongoDB in NextJS, you can follow these steps: Step 1: Install the mongodb package in your Next.js project: npm install mongodb Step 2: Set up a connection to your MongoDB database. Create a file, let’s say db.js, in the root of your NextJS project: import

How to make a Blog detail page with data fetch from mongoDB in nextJS Read More »

Next JS

Stylesheets and Script tag In Head Component of next js

Why This Error Occurred? Do not add stylesheets using next/head (see <link rel=”stylesheet”> tag with href=”https://cdn.jsdelivr.net/npm/bootstrap@5.3.0-alpha1/dist/css/bootstrap.min.css”). Use Document instead. See more info here: https://nextjs.org/docs/messages/no-stylesheets-in-head-component Do not add <script> tags using next/head Next JS don’t recommend this pattern because it will potentially break when used with Suspense and/or streaming. In these contexts, next/head tags aren’t: guaranteed to

Stylesheets and Script tag In Head Component of next js Read More »

Tutorial - 1 How to install and create nextJS project

Create and install nextJS application

Next.js is a popular React-based framework for building server-rendered (or statically exported) web applications. It was developed by Vercel (formerly known as Zeit) and has been widely adopted by the JavaScript community due to its simplicity, performance, and developer experience. Here are some of the key features and benefits of Next.js: Server-side rendering (SSR): Next.js

Create and install nextJS application Read More »

React vs Angular

React vs Angular: Which Is the Best JavaScript Framework?

Angular and React, as they’re two of the most popular front-end development frameworks. But how can you pick between angular vs react? Angular: Angular is a Google-developed and maintained web framework that was first released in 2010 under the name AngularJS. It quickly became one of the most popular web frameworks at the time. This

React vs Angular: Which Is the Best JavaScript Framework? Read More »

Hash password node js

Hashing passwords using Bcrypt with Nodejs

According to Wikipedia “bcrypt is a password hashing function designed by Niels Provos and David Mazières, based on the Blowfish cipher. In real life applications with User authentication functionality, it is not practical to store user password as the original string in the database but it is good practice to hash the password and then store them into the database.

Hashing passwords using Bcrypt with Nodejs Read More »

Javascript-array-method

JavaScript Array Methods

Converting Arrays to Strings The JavaScript method toString() converts an array to a string of (comma separated) array values. Example const fruits = [“Banana”, “Orange”, “Apple”, “Mango”]; let fruitsString = fruits.toString(); console.log(fruitsString); Result: Banana,Orange,Apple,Mango The join() method also joins all array elements into a string. It behaves just like toString(), but in addition you can specify the separator: Example const fruits = [“Banana”, “Orange”, “Apple”, “Mango”]; let fruitsJoin

JavaScript Array Methods Read More »