React JS Interview Questions for Freshers 2024
React JS Interview Questions for Freshers 2024

React JS Interview Questions for Freshers 2024

Q1. What is React JS?

Answer: React JS is a front end JavaScript library for developing complex and interactive web and mobile UI with reusable components by Facebook. It has huge ecosystem of libraries to choose the tools, libraries. architecture based on the requirements.

Q2.Write the features of React JS?

Answer:

  • JSX
  • Data rendering
  • One way data binding
  • Virtual DOM

Q3. What are the advantages of React?

Answer:

  • Reusable components
  • Easy and effective creation of dynamic web applications
  • Performance enhancement
  • Flexible JavaScript library with handy tools

Q4. What is JASX?

Answer: JASX stands for JavaScript XML.JSX is a syntax extension to JavaScript which is similar to XML/HTML like syntax used by React that helps to put HTML into JavaScript.

Q5. What is virtual DOM?

Answer: The virtual DOM is a?programming concept where the virtual representation of a UI is kept in memory and synced?with the real DOM by a library such as React DOM.

Q6. Difference between React and angular?

Answer:

  1. React is a library for building UI components, while Angular is a full-fledged MVC framework.
  2. React uses JSX for writing components, while Angular uses TypeScript.
  3. React primarily employs one-way data flow, while Angular supports both one-way and two-way data binding.
  4. React promotes the concept of reusable components, while Angular has a more opinionated structure with components, services, and modules tightly integrated.
  5. React has a large and diverse ecosystem of third-party libraries, while Angular offers a more cohesive development experience with its official tools and libraries.

Q7. How to create component in React?

Answer: When creating a React component, it has to include the?extends React. Component?statement, that creates an inheritance to React. Component, and gives the component access to React. Component’s functions. The component also requires a?render()?method, this method returns HTML.

Q8. What is the difference between element and component?

Answer: React Element is a simple object that describes a DOM node and its attributes or properties as per our requirement. It is an immutable description object and any method cannot be applied on it. React Component is a function or class that accepts an input and returns a React element

Q9. What is the purpose of render () in React?

Answer: The React DOM. render() function takes two arguments, HTML code and an HTML element. The purpose of the function is?to display the specified HTML code inside the specified HTML element.

Q10. Explain strict mode in React?

Answer: Strict Mode is?a tool for highlighting potential problems in an application. It does not render any visible UI. It activates additional checks and warnings for its descendants.

Sharmila kannan

web Development||Java||Python

11 个月

6th questions explanations was swapped between angular and react react uses one way data binding and virtual DOM

要查看或添加评论,请登录

Priya Vino的更多文章

社区洞察

其他会员也浏览了