GithubHelp home page GithubHelp logo

harish08102004 / lab-react-pro-hooks-boilerplate Goto Github PK

View Code? Open in Web Editor NEW

This project forked from ayushkumar2808/lab-react-pro-hooks-boilerplate

0.0 0.0 0.0 309 KB

JavaScript 47.53% CSS 12.01% HTML 40.46%

lab-react-pro-hooks-boilerplate's Introduction

Logo-nav

Kalvium Lab | Pro-Hooks

Learning Goals

In this exercise, the aim is to understand the following hooks:

  • useMemo
  • useCallback

Steps to follow:

  1. clone this repository.
  2. use npm install or npm i, to install all the dependancies.
  3. use npm start to run the application - and check whether the application is running or not.

Task:

Initially, you will see the application running in the following manner -

And if you open you console, you will see the console, in the following way -

NOTE: You must have observed, the delay while clicking on the dark and change value button. You must have observed that, when you change the background color, there is a delay.

Your task is to optimize the given code, and remove the delay - as shown below:

NOTE: You must have also observed, that initially, in your console, if you click any button --> Delay function ran and callback function was called --> these two text message get consoled everytime you click any of the three buttons.

Your task is to optimize the code in such a way --> that these two texts : Delay function ran and callback function was called, only appear in console, when you click on change value button - as shown below:

Happy Coding ❤️!

lab-react-pro-hooks-boilerplate's People

Contributors

kalvium-program avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.