Awd MCQ
Awd MCQ
https://www.w3schools.com/quiztest/quiztest.asp?
qtest=REACT
a. React
b. React.js
c. ReactJS
Answer: D is the correct option as all of the above statements are the
advantages of React.js.
3) Which of the following is not a disadvantage of React.js?
a. React.js has only a view layer. We have put your code for Ajax
requests, events and so on.
Answer: C is the correct answer. "The JSX in React.js makes code easy to
read and write" is an advantage of React.js.
d. install -g create-react-app
a. Original DOM
b. Virtual DOM
c. Both A and B.
d. None of the above.
a. Constructor
b. Class
c. Object
d. DataObject
a. Class
b. Factory
c. Render
d. Props
Hide Answer Workspace
a. Create
b. Inherits
c. Extends
d. This
1. var Helloword=(props)=>
2. {
3. return(
4. <div>
5. Hello World 1
6. </div>
7. <div>
8. Hello World 2
9. </div>
10. );
11. }
12. ReactDOM.render(<Helloworld/>,mountNode)
a. Hello World 1
b. Hello World 2
Answer: D is the correct option. The two adjacent elements in JSX should
be wrapped in an element so, this program will result an error.
a. 3000
b. 8080
c. 3030
d. 6060
or
What is the default port for React serve?
By default, React applications created with create-react-app are configured to run
on port 3000
11) How many numbers of elements a valid react component can return?
a. 1
b. 2
c. 4
d. 5
a. 1
b. 3
c. 4
d. 5
a. A permanent storage.
17) Which of the following is a must API for every React.js component?
a. SetinitialComponent
b. renderComponent
c. render
18) Which of the following option is correct in the case of the Babel?
a. Babel is a Compiler.
b. Babel is a Transpilar.
c. None of the above.
a. TRUE
b. FALSE
d. Cannot say
c. It is a module bundler.
21) Which of the following is used to pass data to a component from outside
in React.js?
a. SetState
c. Props
d. PropTypes
a. ECMAScript 6
b. ECMA 6
c. ECMAJavaScript 6
d. EJavaScript 6
Hide Answer Workspace
23) Which of the following function is used to change the state of the React.js
component?
a. this.setState
b. this.setChangeState
c. this.State{}
24) Which of the following method refers to the parent class in React.js?
a. inherits()
b. self()
c. super()
d. this()
Answer: C is the correct answer. The super() method refers to the parent
class. If you want to call the parent's constructor method and get access
to the parent's properties and methods, you can achieve it by calling the
super() method in the constructor.
25) What will happen if you render an input element with disabled = {false}?
26) Which of the following function is called to render HTML to the web page
in React?
a. render()
b. Render()
c. ReactDOM.render()
d. renderDOM()
Answer: A is the correct option. React renders HTML to the web page by
using a function called ReactDOM.render().
27) Which of the following lifecycle events React components have at the
highest level?
a. Destruction
b. Initialization
c. State/Property Updates
a. ReactDOM.destroy()
b. ReactDOM.hydrate()
c. ReactDOM.createPortal()
d. ReactDOM.findDOMNode()
31) How can you set a default value for an uncontrolled form field?
d. It is assigned automatically.
a. Synchronous in nature.
b. Asynchronous in nature.
34) What changes would appear in the component as soon as the state of the
React component is changed?
36) In which of the following condition, the React.js Lifecycle method static
getDerivedSateFromProps(props, state) is called?
38) What is true for the keys given to a list of elements in React?
Answer: b
Explanation: A valid react component can return only one element.
Explanation:
A. JSON
B. JSON XML
C. JavaScript XML
D. JavaScript and AngularJS
Explanation:
----------------------------------------------------------------------------------------------------------
A. jQuery in React
B. Angular Code in React
C. MySQL in React
D. HTML in React
Explanation:
-------------------------------------------------------------------------------------------------------------
Answer: B) { expression }
Explanation: