React Day02

React Day02

Professional Development

25 Qs

quiz-placeholder

Similar activities

C++. Синтаксис

C++. Синтаксис

Professional Development

30 Qs

Soal Psikotes

Soal Psikotes

Professional Development

20 Qs

React day6

React day6

Professional Development

22 Qs

LATIHAN 5 - OTBC 2023 "IPO & PPMS"

LATIHAN 5 - OTBC 2023 "IPO & PPMS"

Professional Development

20 Qs

DEPLOYMENT MEETING DESEMBER 2020

DEPLOYMENT MEETING DESEMBER 2020

Professional Development

21 Qs

web development

web development

Professional Development

20 Qs

Coding Assignment

Coding Assignment

Professional Development

30 Qs

EDSMQ Workshop

EDSMQ Workshop

Professional Development

20 Qs

React Day02

React Day02

Assessment

Quiz

Other

Professional Development

Medium

Created by

Gnanavel Durairaj

Used 2+ times

FREE Resource

25 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

How can you handle multiple form inputs in React?

Using separate state variables for each input

Using an object in state with input names as keys

Using session storage

Using Redux only

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

How can you make an input field controlled in React?

By setting its value attribute to a state variable

By using defaultValue instead of value

By setting contentEditable=true

By wrapping it inside a <form>

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What are props in React?

A way to manage component state

A method for updating the UI

A way to pass data between components

A way to create a component

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

How are props passed in React?

Using this.props in functional components

By passing them as arguments to a function

Using global variables

By declaring them inside useState

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which syntax correctly passes a prop named name to a child component?

<Child name="John" />

<Child prop.name="John" />

<Child {name="John"} />

<Child>John</Child>

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Props are immutable in React. What does this mean?

Props cannot be changed inside a component

props are automatically updated when the parent state changes

Props are stored in local storage

Props need to be initialized with useState

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What happens if a prop is missing in a component?

React will throw an error

The component will not render

The prop will be undefined

The default value will always be applied

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?