Skip to content
Top Bar

Pravin Varma

Web Developer | Photography | Graphic Design | Digital artwork | Photo editing

  • My Digital Artwork
  • Photography
  • View My Profile
Javascript

React useMemo example with explanation

Jul 8, 2021 Pravin Varma Comments Off on React useMemo example with explanation

import React,{useMemo,useState} from “react”;import “./style.css”;export default function App() { const [state, setState] = useState(0); for(let i=1;i<10;i++){ let a=1; let b = 1; console.log(useMemo(()=> {console.log(‘invoked’);return a+b},[a,b]))

Javascript

Mapping useEffect with lifecycle hook methods in React

Jul 5, 2021 Pravin Varma Comments Off on Mapping useEffect with lifecycle hook methods in React

componentDidMount useEffect(() => { // will run on every render }); useEffect(() => { // will run on first render },[]); componentDidUpdate useEffect(() => {

Javascript

Prevent child from re-rendering in React using React.memo

Jun 19, 2021 Pravin Varma Comments Off on Prevent child from re-rendering in React using React.memo

This is the parent component import React,{useEffect, useState} from ‘react’; import ‘./style.css’; import Child1 from ‘./child1’; export default function App() { const [change, setChange] =

Javascript

Chaining of methods for Javascript object

Jun 11, 2021 Pravin Varma Comments Off on Chaining of methods for Javascript object

function Student() { this.obj = {}; this.setName = function(name) { this.obj.name = name; return this; }; this.setAge = function(age) { this.obj.age = age; return this;

Javascript

A tricky useEffect dependency

Jun 11, 2021 Pravin Varma Comments Off on A tricky useEffect dependency

The following code returns 1. It is tricky but should be eye opener. export default function App() { const [state, setState] = useState(”); useEffect(()=>{ console.log(1)

Javascript

Find duplicate element in an array in Javascript

Jul 14, 2020 Pravin Varma Comments Off on Find duplicate element in an array in Javascript
Javascript

React useMemo example with explanation

Jul 8, 2021 Pravin Varma 0
Javascript

Mapping useEffect with lifecycle hook methods in React

Jul 5, 2021 Pravin Varma 0
Javascript

Prevent child from re-rendering in React using React.memo

Jun 19, 2021 Pravin Varma 0
Javascript

Chaining of methods for Javascript object

Jun 11, 2021 Pravin Varma 0
CSS

Media Queries continued..

Mar 12, 2016 Pravin Varma

While learning about the Media Queries, I was having confusion between the properties height/width and

CSS

Using Media Queries for Responsive Web Design

Mar 12, 2016 Pravin Varma

You might have used the media attribute while attaching styles to target screen or sometimes

CSS

Working with CSS3 transition properties

Mar 12, 2016 Pravin Varma

CSS3 includes transition properties which helps to make certain element to change its current state

Posts navigation

PrevPrevious page Page 1 Page 2 Page 3

Pages

  • My Digital Artwork
  • Photography
  • View My Profile

Blogroll

  • Chrome extension
  • Flash Game

Archives

  • July 2021
  • June 2021
  • July 2020
  • June 2019
  • February 2019
  • January 2018
  • September 2017
  • July 2016
  • March 2016
useMemo React
Javascript

React useMemo example with explanation

Jul 8, 2021 Pravin Varma 0
hooks react
Javascript

Mapping useEffect with lifecycle hook methods in React

Jul 5, 2021 Pravin Varma 0
Javascript

Prevent child from re-rendering in React using React.memo

Jun 19, 2021 Pravin Varma 0
method chaining
Javascript

Chaining of methods for Javascript object

Jun 11, 2021 Pravin Varma 0
Javascript

A tricky useEffect dependency

Jun 11, 2021 Pravin Varma 0
Javascript

Find duplicate element in an array in Javascript

Jul 14, 2020 Pravin Varma 0

Follow Us

Contact Us

  • Email
    pravindvarma@gmail.com
  • Phone
    9970019634
  • Address
    Pune, India
Copyright © 2022 Bosa Blog. Powered by Bosa Themes