React Multiple Choice Questions

  • 1) There are two types of components in React JS
  • 2) What function allows you to render React content in an HTML page?
  • 3) Which of the following statement is true for controlled components in React.js?
  • 4) What changes would appear in the component as soon as the state of the React component is changed?
  • 5) Which of the following statement is true for uncontrolled components in React.js?
  • 6) What is the use of the create-react-app command in the React.js application?
  • 7) What is true for the keys given to a list of elements in React?
  • 8) What is Reconciliation?
  • 9) As soon as the state of the React component is modified, the component _______
  • 10) Among The following options, choose the one which helps react for keeping their data uni-directional?
  • 11) What is the declarative way to make a dynamic list of components based on the values of an array.
  • 12) When is it recommended to pass this.setState as a function instead of an object?
  • 13) What is the purpose of the second argument of setState?
  • 14) As soon as the state of the React component is modified, the component _______
  • 15) Must API for every ReactJs component
  • 16) How can we prevent default behavior in React?
  • 17) React is mainly for building _____________.
  • 18) JSX is faster because it performs ____________ while compiling code to JavaScript Modification
  • 19) . In JSX most of the errors can be caught during _________.
  • 20) Lifecycle methods are mainly used ___________.
  • 21) ______ can be done while more than one element needs to be returned from a component.
  • 22) We can go for keys when there is possibility that our user could change the data.
  • 23) Why use async/await over simple promise chains?
  • 24) Which of the following is NOT a good reason for having presentational and container logic separate in a component?
  • 25) What is the way to avoid passing props through intermediate elements in the component tree?
  • 26) What is shallow rendering?
  • 27) Which lifecycle methods are not triggered if shouldComponentUpdate() returns false?
  • 28) Mixins are not available when defining components with JavaScript classes. What’s the recommended alternative?
  • 29) How do you define a React pure component?
  • 30) How do you stop event propagation in React?
  • 31) Which of the following lifecycle methods does not get triggered on the component’s initial render?
  • 32) Which among the following is true w.r.t React hooks?
  • 33) Which among the following statements are true w.r.t React? S1: It supports server-side rendering. S2: It follows bidirectional data binding
  • 34) Which type of programming language is Reactjs?
  • 35) The component also requires a render() method, this method returns?
  • 36) In React, component properties should be kept in an object called?
  • 37) What is ReactJS?
  • 38) With JSX you can write expressions inside?
  • 39) Everything in react is _______
  • 40) To upload a file from react component, A developer will require to write
  • 41) For uncontrolled components in react
  • 42) For controlled components in react
  • 43) Keys are given to a list of elements in react. These keys should be
  • 44) As soon as the state of react component is changed, component will
  • 45) Regarding React js components, which of following statement is true?
  • 46) Everything in react is ________
  • 47) React Js is developed by
  • 48) What is the second argument for setState useful for?
  • 49) How can you access the state of a component from inside of a member function?
  • 50) In ReactJS, what is State?
  • 51) What are components in ReactJS?
  • 52) Which method is used to generate lists?
  • 53) In ES6 – Which keyword is used to define a constant?
  • 54) In ES6 – let is the block scoped version of ____.
  • 55) With an arrow function – this keyword represents _____.
  • 56) In ES6 – Why arrow functions are used?
  • 57) In ES6 – What is the correct syntax of class inheritance?
  • 58) In ES6 – The class properties are assigned inside a _____ method.
  • 59) In ES6 – A class is a type of ____.
  • 60) How to install create-react-app?
  • 61) What does props stand for?
  • 62) What are Props?
  • 63) A class component must include the _______ statement.
  • 64) What is the correct syntax to write expression in JSX?
  • 65) JSX allows us to write _____.
  • 66) JSX stands for _____.
  • 67) Which ReactJS function renders HTML to the web page?
  • 68) React is a ____.
  • 69) Which of the following is correct about prop in react?
  • 70) In which condition is the React.js Lifecycle method static getDerivedSateFromProps(props, state) is called?
  • 71) In which of the following directory React Components are saved?
  • 72) How many elements can a valid react component return?
  • 73) React.js is written in which of the following language?
  • 74) What is React.js?
  • 75) We can update the state in React.js by calling to setState() method. These calls are:
  • 76) How can you set a default value for an uncontrolled form field?
  • 77) Which of the following method is not a part of ReactDOM?
  • 78) Which of the following best defines the "key" prop?
  • 79) Why is the usage of setState?
  • 80) What will happen if you render an input element with disabled = {false}?
  • 81) Which of the following method refers to the parent class in React.js?
  • 82) Which of the following function is used to change the state of the React.js component?
  • 83) What does ES6 stand for?
  • 84) Which of the following is used to pass data to a component from outside in React.js?
  • 85) What is the use of "webpack" command in React.js?
  • 86) Does React.js create a VIRTUAL DOM in the memory?
  • 87) Which of the following is a must API for every React.js component?
  • 88) In which of the following directory React.js components are saved?
  • 89) What are the two ways to handle data in React?
  • 90) What is a state in React?
  • 91) How many ways of defining your variables in ES6?
  • 92) What is the declarative way to render a dynamic list of components based on values in an array?
  • 93) How many numbers of elements a valid react component can return?
  • 94) What is the default port where webpack-server runs?
  • 95) Which of the following keyword is used to create a class inheritance?
  • 96) Which of the following acts as the input of a class-based component?
  • 97) A class is a type of function, but instead of using the keyword function to initiate it, which keyword do we use?
  • 98) What of the following is used in React.js to increase performance?
  • 99) Which of the following command is used to install create-react-app?
  • 100) Which of the following is not a disadvantage of React.js?