wayground logo

Free Printable Worksheets

NEW

Font size

S
M
L
XL
Worksheets

React (The Last Act)

Total questions: 10

Worksheet time: 3mins

Name
Class
Date
1.

What do you call the message wrapped in curly braces below?

let message = 'Hi there';

const element = <p>{message}</p>;

a)

 A JS function

b)

A JS element

c)

A JSX wrapper

d)

A JS expression

2.

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.

b)

The library of React.js is pretty large.

c)

The JSX in React.js makes code easy to read and write.

d)

The learning curve can be steep in React.js.

3.

What would be the output of the following example?

var Helloworld=(props)=>  {  

 return(  

 <div>  

 Hello World 1  

 </div>  

 <div>  

 Hello World 2  

 </div>  

 );  

}  

ReactDOM.render(<Helloworld/>,mountNode)  

a)

Hello World 1

b)

Hello World 2

c)

Hello World 1 Hello World 2

d)

Error

4.

How many numbers of elements a valid react component can return?

a)

1

b)

2

c)

3

d)

4

5.

Which of the following is used to pass data to a component from outside in React.js?

a)

 SetState

b)

Render with arguments

c)

Props

d)

 PropTypes

6.

What does ES6 stand for?

a)

 ECMAScript 6

b)

ECMA 6

c)

ECMAJavaScript 6

d)

EJavaScript 6

7.

What is Babel?

a)

 A JavaScript transpiler

b)

A JavaScript interpreter

c)

 A JavaScript Compiler

d)

 None of the above

8.

React is used mainly for building ........

a)

Database

b)

User interface

c)

Connectivity

d)

Design platform

9.

Which function is used to change the state of react component?

a)

this.State{}

b)

 this.setState

c)

this.setChangeState

d)

 None of the Above

10.

What do you call the message wrapped in curly braces below?

let message = 'Hi there';

const element = <p>{message}</p>;

a)

A JS function

b)

A JS element

c)

 A JSX wrapper

d)

A JS expression