Quiz of React

Question 1
<p>React is mainly used&nbsp;for _______ (if needed, google it)</p>

building User Interface

building Database

building User Data Flow

building Shop

Question 2
<p>How do you declare a class called “myClass” in react?</p>

class = “myClass”

Class = “myClass”

className = “myClass”

I don’t know

Question 3
<p>Which method will you use in react to display components for each object in an array?</p>

filter

find

map

for

Question 4
<p>How will create a state with a default value “JingaLala”?</p>

const { name, setName } = useState(“JingaLala”);

[name, setName] = UseState(“JingaLala”);

const ( name, setName ) = useState(“JingaLala”);

const [name, setName] = useState(“JingaLala”);

Question 5
<p>Why can’t we declare a class with the “class” keyword in React?</p>

We should use class instead of className

class is a reserved keyword in javascript

We can use any name

Question 6
<p>What is&nbsp;&nbsp;JSX?</p>

Javascript Html

Javascript XML

React XML

Javascript Http

Question 7
<p>When creating a component in React, the first letter of that function name should be in ____</p>

Uppercase

Lowercase

I can use Both

Question 8
<p>What is the correct way of creating a component in react?</p>

function nayika() { return <h3>Mousumi </h3>}

function Nokiya() [ return <h3> Mousumi <h3> ]

function Nayika() ( return <h3> Mousumi </h3> )

function Nayika() { return <h3> Mousumi </h3> }