React Day02

React Day02

Professional Development

25 Qs

quiz-placeholder

Similar activities

CSS Unit 1

CSS Unit 1

Professional Development

20 Qs

Mid Test React JS

Mid Test React JS

Professional Development

25 Qs

React Day 04

React Day 04

Professional Development

25 Qs

TeenKaTadka Finale

TeenKaTadka Finale

Professional Development

20 Qs

Dasar Manajemen dan Bisnis

Dasar Manajemen dan Bisnis

University - Professional Development

20 Qs

NodeJS Post-assessment

NodeJS Post-assessment

Professional Development

20 Qs

daily live event : 24/06/2020

daily live event : 24/06/2020

Professional Development

25 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?