
SEB-72 Week 7 Beginnings of React
Authored by Lay Jones
Instructional Technology
Professional Development
Used 3+ times

AI Actions
Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...
Content View
Student View
13 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
20 sec • 1 pt
What is the new way to create a new React Project?
npx create vite
npm create-react-app MyApp
npm create vite
npx create-react-app my-app
2.
MULTIPLE CHOICE QUESTION
20 sec • 1 pt
What command is used to start the React local server (using the new way of creating a react app)
npm run dev
npm run start
npm run build
3.
MULTIPLE CHOICE QUESTION
20 sec • 1 pt
I get a ' Adjacent JSX elements must be wrapped in an enclosing tag' error with this code, why might that be?:
return (
<div> div 1 </div>
<div> div 2 </div>
);
Each div requires a unique id or class
React can only return one parent jsx/html element, you need to put these divs inside of something else.
The return must be {} instead of ()
4.
MULTIPLE CHOICE QUESTION
20 sec • 1 pt
In React, how can we pass the data from one component to another?
Props
5.
MULTIPLE CHOICE QUESTION
20 sec • 1 pt
What is the purpose of the useState hook in React?
To render elements on the page
6.
MULTIPLE CHOICE QUESTION
20 sec • 1 pt
What is the correct syntax for useState?
const [setValue, value] = useState('initialValue');
const { value, setValue } = useState('initialValue');
const { setValue, value } = useState('initialValue');
const [value, setValue] = useState('initialValue');
7.
MULTIPLE CHOICE QUESTION
20 sec • 1 pt
Which is not an in-built hook in react
useRef()
useEffect()
useState()
useFetch()
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?