ProFlemingo

React.js Questions:

1. What is React.js?
a) Open-source JavaScript back-end library
b) JavaScript front-end library to create a database
c) Free and open-source JavaScript front-end library
d) None of the mentioned
2. Which of the following acts as the input of a class-based component?
a) Class
b) Props
c) Factory
d) None of the mentioned
3. React.js is written in which of the following language?
a) C
b) C++
c) JavaScript
d) Java
4. How many elements can a valid react component return?
a) React doesn’t return element
b) 1 Element
c) More than 1 element
d) None of the mentioned
5. In which of the following directory React Components are saved?
a) Inside js/components/
b) Inside components/js/
c) Inside vendor/js/components/
d) Inside vendor/components/
6. Which of the following command is used to Install create-react-app?
a) npm install create-react-app
b) npm install -f create-react-app
c) npm install -g create-react-app
d) install -g create-react-app
7. In which condition is the React.js Lifecycle method static getDerivedSateFromProps(props, state) is called?
a) When the state of the component is updated
b) When a component is created for the first time
c) Both of the mentioned
d) None of the mentioned
8. Which of the following is method is not a part of ReactDOM?
a) ReactDOM.hydrate()
b) ReactDOM.destroy()
c) ReactDOM.createPortal()
d) All of the mentioned
9. Which of the following is correct about prop in react?
a) Can be changed inside another component
b) Can be changed inside the component
c) Cannot be changed in the component
d) All of the mentioned
10. Which of the following is used to pass data to a component from outside in React?
a) props
b) render with arguments
c) setState
d) PropTypes
11. Which of the following statement is true for AngularJS?
a) AngularJS is a closed-source front-end web framework
b) AngularJS is an open-source front-end web framework
c) AngularJS is an open-source backend web framework
d) AngularJS is a closed-source back-end web framework
12. Which of the following is the correct syntax for writing AngularJS expressions?
a) {{expression}}
b) {{expression | filter1 | filter2 | …}}
c) Both of the mentioned
d) None of the mentioned
13. Which of the following components can be injected as a dependency in AngularJS?
a) factory
b) service
c) value
d) All of the above
14. Which of the following directives is used to start an angularJS application?
a) ng-repeat
b) ng-init
c) ng-app
d) ng-model
15. AngularJS expressions bind AngularJS data to HTML like which of the following directive?
a) ng-repeat
b) ng-bind
c) ng-app
d) ng-model