React Hooks

What is HR Automation?

It is a feature introduced to play with states in functional components as previously it was just being used with class components only. Hooks are the functions which “hook into” React state and life cycle features from function components. RULES FOR USING HOOKS: (1)- Only call hooks at top level (2)- Only call hooks from react function SYNTAX INVOLVED WITH USING STATE IN HOOKS:


import React, {useState} from ‘React;

  1. importReact, { useState } from ‘react’;  
  3. function CountApp() {  
  4. // Declare a new state variable, which we’ll call “count”  
  5. const [count, setCount] = useState(0);  
  7. return (  
  8. <div>  
  9. <p>You clicked {count} times</p>  
  10. <button onClick={() => setCount(count + 1)}>  
  11. Click me  
  12. </button>  
  13. </div>  
  14. );  
  15. }  
  16. export defaultCountApp;


(1)- useState()

(2)- useEffect()

(3)- useContext()

Sana Eram

Data Scientist Intern

Share on facebook
Share on twitter
Share on linkedin
Share on pinterest
Share on whatsapp
Share on email

Leave a Reply

Your email address will not be published. Required fields are marked *

Recent Post

Hadoop Vs. Hbase

Hadoop is an open-source framework of programs that is used to store and process big data. Hadoop uses multiple clusters of computers to analyze big data sets in parallel. The distributed processing of data sets can

Read More »
no sql databases

No SQL Databases : Types

No SQL databases are non-relational databases. It is an approach to database design which allows storage and retrieval of data in a non-tabular format as that found in relational database. NoSQL

Read More »

Contact us for a quote, help, or to join the team.



(732) 347-6245

About Us

iSmile Technologies is a global technology services company.
(732) 347-6245


+1 (732) 347-6245
241 Jonathan Way
Bolingbrook, IL 60490


2-3-285, Secunderabad Hyderabad 500003


3190 Stocksbridge Ave
Oakville, ON L6M 0A7