React Js Online Test


  • This practice test has 20 questions
  • You have to attempt all the questions
  • Time will be 05:00 minute for 20 questions. After 05:00 minute, practice test will be submitted automatically and you will redirect to result page.
  • This practice test is for self evalutation, if you get less marks then passing marks. Please prepare more for get excellent mark next time
  • Best of luck :)
Time: 05:00 minutes Passing Marks: 60%

1. In React, how do you conditionally apply styles to components based on component state or props?

2. Which CSS-in-JS library is commonly used for styling React components?

3. What is React's primary purpose in web development?

4. What is the primary purpose of making HTTP requests in a React application?

5. Which type of data is typically stored in component state in React?

6. What is the recommended approach for structuring tests in a React application?

7. Which of the following is a common approach for handling errors in React?

8. Which lifecycle method should be used to perform cleanup when a component is unmounted?

9. In React DevTools, what does the "DOM" tab show?

10. Which React hook is used for managing state in functional components?

11. When working with lists in React, which operation is more efficient: adding an item to the beginning or end?

12. What does the "Props" panel in React DevTools display?

13. Which command is used to create a new React application using Create React App (CRA)?

14. In React, how do you create a custom Hook for reusing stateful logic across different components?

15. What is the purpose of the package.json file in a React project?

16. Which of the following data formats is commonly used for API responses that contain structured data in React?

17. What is a common method for optimizing images in a React application before deployment?

18. What happens if an error occurs while loading a lazily loaded component in React?

19. What is the purpose of the public directory in a React project?

20. What is the primary purpose of React Hooks?