NEW
Font size
WorksheetsReact (The Last Act)
Total questions: 10
Worksheet time: 3mins
What do you call the message wrapped in curly braces below?
let message = 'Hi there';
const element = <p>{message}</p>;
A JS function
A JS element
A JSX wrapper
A JS expression
Which of the following is not a disadvantage of React.js?
React.js has only a view layer. We have put your code for Ajax requests, events and so on.
The library of React.js is pretty large.
The JSX in React.js makes code easy to read and write.
The learning curve can be steep in React.js.
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)
Hello World 1
Hello World 2
Hello World 1 Hello World 2
Error
How many numbers of elements a valid react component can return?
1
2
3
4
Which of the following is used to pass data to a component from outside in React.js?
SetState
Render with arguments
Props
PropTypes
What does ES6 stand for?
ECMAScript 6
ECMA 6
ECMAJavaScript 6
EJavaScript 6
What is Babel?
A JavaScript transpiler
A JavaScript interpreter
A JavaScript Compiler
None of the above
React is used mainly for building ........
Database
User interface
Connectivity
Design platform
Which function is used to change the state of react component?
this.State{}
this.setState
this.setChangeState
None of the Above
What do you call the message wrapped in curly braces below?
let message = 'Hi there';
const element = <p>{message}</p>;
A JS function
A JS element
A JSX wrapper
A JS expression
