React Interview Question
React Interview Question
----------------------------
Q. What is HTML?
Q. What is HTML element?
Q. What are html tags & lists out? ==> e.g. div, p, h1 etc
Q. What is html attributes & list out? ==> name, value, src, id, class
Q. What is inline element & block level element & list out?
Q. What is semantic html element?
Q. What are selector in HTML? ==> id & class selector
Q.
========================================================================
CSS QUESTIONS
--------------------------
Q. What is css?
Q. What box model & explain?
Q. What is desplay property? ==> property value = block, inline, none, flex, gird
Q. Explain css position property? ==> property value = static (default), relative,
fixed, absolute, sticky
Q. What is flexbox?
Q. What are different flex property? property = flex-direction, flex-wrap, justify-
content, align-item, align-content, flex, align-self
========================================================================
JAVASCRIPT QUESTIONS
--------------------------
Q. What is DOM (Document Object Model)?
Q. How we can do DOM manuplation?
Q. What is BOM (Browser Object Model)
Q. What is use of debugger keyword in javascript while development?
Q. What are different data type in javasript?
Q. Is javscript a statically typed or a dynamically typed language?
Q. What is NaN property in Javascript?
Q. What is difference between let, const & var?
Q. What are the different type of variable scope in JS? ==> global scope &
block/function scope
Q. What is hoisting in javascript?
Q. What is spread operator?
Q. What is rest operator?
Q. What is the output of 10+20+"50" in JavaScript? ==>("3050")
Q. What is the output of "10"+20+50 in JavaScript? (“102050”)
Q. What is functions?
Q. What is promises in javascript?
Q. What is object destructuring?
Q. Difference between cookes & local storage?
Q. What is session storage?
Q. What is ES6 feature & list down? ==> let, const, arrow function, classes,
promises, rest parameter etc.
========================================================================
REACT QUESTIONS
--------------------------
Q. What is react?
Q. What is JSX?
Q. Is JSX & Html same? ==> no
Q. What is virtual DOM in react?
Q. What is component in react?
Q. Difference between class component & functional component?
Q. How many elements can be returned by a valid React component? ==> only one
Q. Explain lifecycle in react? ==> mounting, updating, unmounting
Q. What is use of render() in react?
Q. What is props in react?
Q. What is prop drilling in react?
Q. What is state in react?
Q. How we can change the state of component?
Q.What is controlled component? ==> controlled component is a component whose value
is controlled by React state.
Q. What are hooks in react & explain them?
Q. What return useState hook? ==> array which consist of state value & function to
update state
Q. Explain useRef hook?
Q. What is useEffect?
Q. How many argument takes useEffect?
Q. What is significance of second argument in useEffect?
Q. What are performance hook in react? ==> useMemo & useCallback
Q. What is difference between useMemo & useCallback?
========================================================================
PRACTICL JAVASCRIPT QUESTIONS
--------------------------
Q. Write a logic to print a 19th table?
Q. Array operation
const testList= [ 10, 15, 40, 8,20 ,35 ,45]
Q. logic to remove index 5 item from array.
Q. logic to remove item having value 40.
Q. logic to filter number from array which is less than 20
Q. logic to add 2 in each item
Q. Object operation
const user = {
firstName: "Akshay",
lastName: "Sharma",
age: 28,
}
Q. add middleName value as "Rohan" in user object
Q. remove age from object
Q. Print full name taking value from object
========================================================================
PRACTICL REACT QUESTIONS
--------------------------
Q. Create a controlled component form having field first name, last name, date of
birth, gender (radio) and store value in state (use Hooks), if user click on submit
button then value should be shown in alert / in UI.
Q. JSON
[
{
"firstName": "Aarav",
"lastName": "Verma",
"middleName": "Kumar",
"hobby": "Photography",
"profilePhoto": "https://thumbs.dreamstime.com/b/portrait-years-old-east-
indian-american-teenager-new-york-city-young-male-college-student-wearing-blue-
short-sleeve-shirt-184522964.jpg"
},
{
"firstName": "Aditi",
"lastName": "Gupta",
"middleName": "Singh",
"hobby": "Reading",
"profilePhoto": "https://c8.alamy.com/comp/BG5BDG/attractive-indian-teenager-
girl-age-aged-18-years-old-wearing-a-pink-BG5BDG.jpg"
},
{
"firstName": "Rahul",
"lastName": "Sharma",
"middleName": "Kumar",
"hobby": "Cooking",
"profilePhoto": "https://images.pexels.com/photos/1042140/pexels-photo-
1042140.jpeg?auto=compress&cs=tinysrgb&dpr=1&w=500"
},
{
"firstName": "Priya",
"lastName": "Patel",
"middleName": "Bose",
"hobby": "Painting",
"profilePhoto":
"https://image1.masterfile.com/getImage/NjE0LTAyMzkzNjIwZW4uMDAwMDAwMDA=AHjKM9/614-
02393620en_Masterfile.jpg"
},
{
"firstName": "Vikram",
"lastName": "Singh",
"middleName": "Rathore",
"hobby": "Playing Football",
"profilePhoto": "https://example.com/profiles/vikram_singh.jpg"
},
{
"firstName": "Neha",
"lastName": "Sharma",
"middleName": "Gupta",
"hobby": "Dancing",
"profilePhoto":
"https://image1.masterfile.com/getImage/NjMwLTAzNDc5ODE4ZW4uMDAwMDAwMDA=ABhMsm/630-
03479818en_Masterfile.jpg"
},
{
"firstName": "Raj",
"lastName": "Malhotra",
"middleName": "Khanna",
"hobby": "Gardening",
"profilePhoto": "https://images.unsplash.com/photo-1609081524998-a1163e2d44cb?
ixlib=rb-
4.0.3&ixid=M3wxMjA3fDB8MHxzZWFyY2h8NHx8aW5kaWFuJTIwYm95fGVufDB8fDB8fHww&w=1000&q=80
"
},
{
"firstName": "Anaya",
"lastName": "Joshi",
"middleName": "Sharma",
"hobby": "Writing",
"profilePhoto": "https://encrypted-tbn0.gstatic.com/images?
q=tbn:ANd9GcTOOJ2Lc9yUn3AdiNcVdCPT-jHyA7DqjoxQ8Q&usqp=CAU"
},
{
"firstName": "Arjun",
"lastName": "Mehta",
"middleName": "Rajput",
"hobby": "Playing Guitar",
"profilePhoto": "https://hairstylecamp.com/wp-content/uploads/indian-boys-
hairstyles-1.jpg.webp"
},
{
"firstName": "Kavya",
"lastName": "Sinha",
"middleName": "Verma",
"hobby": "Travelling",
"profilePhoto": "https://assets.entrepreneur.com/content/3x2/2000/1675448878-
63d8c8320a08ae0018a61f89copy.jpg"
}
]