React MCQs – Multiple Choice Questions and Answers – Part 2

Multiple choice questions and answers (MCQs) on React to prepare for exams, tests, and certifications. These questions are taken from a real written exam and some parts are taken from an interview. So you will find questions on basic techniques such as UI, DOM, services, JSX, and more. This quiz will easily prepare anyone to pass their online test.

1. Props in React can ________

A Be modified inside the component

B Not be modified in the component

C Be modified in another component

D None of the above

“Props” is a special keyword in React, which stands for properties and is used to transmit data from one component to another. But the important part here is that data with props is transmitted in a one direction.

In addition, the data in Props is read-only, which means that the data coming from the parent must not be modified by the child components.



2. In ReactJS, props can be used to trnasmit ________

A component properties

B component event handlers

C Both A and B are true.

D None of the above

In ReactJS, props can be used to trnasmit properties and event handlers to the component.



3. What does the “webpack” command do?

A Turns all JavaScript into one file

B Runs the React local development server.

C A bundler module

D None of the above

Webpack is a powerful module bundle for JavaScript applications. It groups all the modules of your application into one or more bundles (often just one) and serves it to the browser.



4. Which port is the default port where the webpack-dev-server will run?

A 3000

B 8080

C 3306

D 8000

The default port where the webpack-dev-server will run is 8080.



5. What are the two ways data is processed in React?

A state & props

B services & components

C state & services

D props & components

React has another special built-in object called State, which allows components to create and manage their own data. Unlike Props, components cannot transmit data with the State object, but they can create and manage it internally.



6. In React, what is used to transmit data to an outside component?

A setState

B render with arguments

C props

D PropTypes

Props are used to transmit data to an outside component.



7. What is the name of the developer of React.js?

A Jordan mike

B Jordan Walke

C Jordan Lee

D Tim Lee

The developer of React.js is Jordan Walke.



8. Who is developing React.js?

A Google

B Twitter

C Apple

D Facebook




9. ______ helps react to keep their data unidirectional.


B Flux

C Dom

D Props

Flux is a unidirectional data flow pattern.



10. The State object in react can be updated by calling the setState method. These calls are _________

A Synchronous by nature

B Asynchronous by nature

C Are asynchronous but can be synchronized if necessary

D None of the above

The call to setState in reactjs is asynchronous in nature and multiple calls can be grouped for better performance.


mcqMCQPractice competitive and technical Multiple Choice Questions and Answers (MCQs) with simple and logical explanations to prepare for tests and interviews.Read More

Leave a Reply

Your email address will not be published. Required fields are marked *