1.
In relation to stateful React components, which of the following statements is correct?
i) React triggers the event handlers in the bubble phase, by default.
ii) For event handlers, CamelCase naming convention is used by React.
iii) React actually attaches event handlers to the DOM nodes themselves.
2. Which of the following is a React framework for creating animations?
3. Which of the following preprocessors is used by ReactJS to add XML syntax to JavaScript?
4. Which of the following methods is skipped on a component that triggered the update when the forceUpdate() method is called?
5. Which Of the following is the correct signature of React testRenderer.update method that is used for re-rendering the in-memory tree with a new root element?
6.
Which of the following statements is! are correct about the ReactJS features?
1. In a ReactJS application, all components have a state.
2. ReactJS virtual DOM can differentiate between a static and a dynamic element.
3. Rendering is possible using a virtual DOM even without dirty checking.
7. Which of the following statements is NOT correct about the ReactDOM.render() method?
8. In relation to ReactJS Flux function, how many and which of the following parameters are passed to the reducer function?
9. In relation to react test utilities, which of the following options is used for checking the user supplied instance and returning true if instance is a user-defined component. such as a class?
10. Which of the following is the correct syntax of the ReactDOM.render() method that is used for rendering React elements?
11. Which of the following options is the correct signature of React createPortaI() method?
12. Which of the following is the correct syntax for adding a file named index.html via command prompt to your React environment? (Consider that reactApp is the root folder.)
13. Which of the following options is the correct syntax for installing Redux via command prompt?
14. Which of the following options is the correct signature of the React.Children.map method?
15. In relation to React Test Renderer, which of the following arguments is/are passed to testInstance.find ()?
16. Which of the following types of brackets are used for including collections of elements in JSX?
17. Which of the following is NOT a correct advantage of ReactJS?
18. Which of the following statements is/are NOT correct about shallowRenderer.render() method in ReactJS?
19.
Which of the following statements are correct about Flux?
i) The application parts are coupled.
ii) Maintenance of the application is easy.
20. Which of the following commands is run for creating an ESLint configuration?
21. Which of the following statements is/are correct about the React method, createFactory()?
22. Which of the following functions is used for importing the React library?
23. In relation to React ES6, which of the following options is used for importing Shallow Renderer?
24. Which of the following options is the correct default value of shouldComponentUpdate() method invoked in the component lifecycle's updating phase?
25. Which of the following arguments are passed to the componentWillUpdate() method that is called immediately before React updates the DOM?
26. In relation to React Test Renderer, which of the following options are used for returning an object that represents the rendered tree?
27. In relation to the React cloneElement() method, which of the following options from the original element are preserved during cloning?
28. Which of the following statements are correct about defining the CSS rules inside a React component?
29. Which of the following commands can be used for running Jest?
30.
What will happen if this code is present in ReactJs component written as ES6 class: shouldComponentUpdate(nextProps, nextState) { return false; }
31.
____ function is invoked immediately before updating occurs?
32.
Which event is best used to update state after props were changed?
33.
Which of the following is used to trigger a UI update?
34.
Which of the following is used for trigger a UI render update?
35.
Which of the following methods initiates custom state for the component?
36.
Which is true for ReactJS components defined as pure JS functions?
37.
Which of the following method is called after getInitialState method?
38.
To use native javascript as an attribute value, the expression should be wrapped within
39.
How transform JSX code in browser?
40.
Pre and post lifecycle methods of components are represented using ___
41.
Why do you need dispatcher in flux?
42.
Which statement about ReacJs is correct?
43.
What is Jest?
44.
Which of the following is used to pass the data from parent to child?
45.
Change or update to large number of nodes is optimized using which of the following techniques?
46.
Which of the following mounting methods is/are invoked before the component is inserted into DOM?
47.
By default ReactTransitionGroup renders as a ___?
48.
What is the role of actions in Redux?
49.
Which of the following is not a flux element?
50.
How can you create ReactJs component?
51.
Which statement about propTypes is incorrect?
52.
React ____ only render subcomponents.
53.
When use mixins?
54.
How to use comments in React JSX?
55.
Which of the following is true about Flux Dispatcher?
56.
Which of the following methods can be used to define any default props which can be accessed via this.props?
57.
Which of the following is true about componentDidMount method?
58. Static object allows the defining of static methods and also means that these methods do not have access to or ?
59. When should you use React.PureComponent?
60. Jest and Enzyme are suggested libraries for what purpose?
61. Which of the following are valid properties of the React Router's Route component? (Check all that apply.)
62. What is the difference between renderToString and renderToStaticMarkup ReactDOMServer's functions?
63. What is a purpose of shallow rendering in React?
64. Can you access refs at a wrapped component in higher-order component technique?
65. Can you render children components outside of a parent component?
66. Consider the following component. What is the default color for the star? const Star = ({ selected = false }) => ;
67. Describe what is happening in this code? const { name: firstName } = person;
68. What is this pattern called? const [count, setCount] = useState(0);
69. How would you generate the boilerplate code for a new app that you are building to collect underpants?
70. Which language can you not use with React?
React.js MCQs | Topic-wise