
React and JavaScript Quiz
Authored by Karnam Bharath
Professional Development
University
Used 2+ times

AI Actions
Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...
Content View
Student View
20 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What does useEffect() do in React?
Fetches data from an API
Handles lifecycle events like componentDidMount
Renders components
Creates a new state
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following is a higher-order component (HOC)?
useState
withAuth(Component)
useEffect
ComponentDidMount
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which keyword is used to create a constant in ES6?
var
constant
const
static
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the primary use of the Redux Toolkit?
CSS styling
Simplifying Redux state management
Creating custom hooks
Building class-based components
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following is NOT true about pure functions?
They always return the same output for the same input
They do not cause side effects
They can modify global variables
They are easy to test
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What does axios.post() return?
A response object
An object with a data property only
A pending fetch call
A Promise
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What’s the purpose of render() in class-based React components?
Run side effects
Return JSX
Update state
Destroy component
Access all questions and much more by creating a free account
Create resources
Host any resource
Get auto-graded reports

Continue with Google

Continue with Email

Continue with Classlink

Continue with Clever
or continue with

Microsoft
%20(1).png)
Apple
Others
Already have an account?