day09

day09

University

30 Qs

quiz-placeholder

Similar activities

Social Psychology

Social Psychology

12th Grade - University

31 Qs

Dental Insurance

Dental Insurance

University

28 Qs

AppDev (Finals)

AppDev (Finals)

University

28 Qs

Introduction to Word

Introduction to Word

6th Grade - Professional Development

26 Qs

HE105

HE105

University

30 Qs

MAWD 1.01 B

MAWD 1.01 B

KG - University

28 Qs

Quiz on Presentations PPT

Quiz on Presentations PPT

University

28 Qs

PENILAIAN HARIAN I TIK KELAS XII

PENILAIAN HARIAN I TIK KELAS XII

University

30 Qs

day09

day09

Assessment

Passage

Other

University

Medium

Created by

Gnanavel Durairaj

Used 1+ times

FREE Resource

30 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the main purpose of the useId hook in React?

Generate unique IDs for accessibility

Manage state in functional components

Handle API requests

Optimize component re-renders

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

When does React typically reset useId?

On every render

On component mount only

Only if dependencies change

Never

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which is the correct way to use useId in TypeScript?

const id = useId();

<label htmlFor={id}>Enter Name</label>

<input id={id} type="text" />

Correct

Incorrect

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What does useId return?

A function

A unique string ID

A state variable

A JSX element

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the key difference between useEffect and useLayoutEffect?

useLayoutEffect runs after paint, useEffect runs before paint

useEffect runs after the render, useLayoutEffect runs before paint

Both run at the same time

useLayoutEffect runs asynchronously

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

When should useLayoutEffect be preferred over useEffect?

When updating the DOM immediately after render

When fetching API data

When setting up event listeners

When logging data to the console

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Does useLayoutEffect run on the server side?

Yes

No

Create a free account and access millions of resources

Create resources
Host any resource
Get auto-graded reports
or continue with
Microsoft
Apple
Others
By signing up, you agree to our Terms of Service & Privacy Policy
Already have an account?