React

Total: 8 questions

1. React is mainly used for _______ (if needed, google it)

a. building User Interface

b. building Database

c. building User Data Flow

d. building Shop

2. How do you declare a class called “myClass” in react?

a. class = “myClass”

b. Class = “myClass”

c. className = “myClass”

d. I don’t know

3. Which method will you use in react to display components for each object in an array?

a. filter

b. find

c. map

d. for

4. How will create a state with a default value “JingaLala”?

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

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

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

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

5. Why can’t we declare a class with the “class” keyword in React?

a. We should use class instead of className

b. class is a reserved keyword in javascript

c. We can use any name

6. What is JSX?

a. Javascript Html

b. Javascript XML

c. React XML

d. Javascript Http

7. When creating a component in React, the first letter of that function name should be in ____

a. Uppercase

b. Lowercase

c. I can use Both

8. What is the correct way of creating a component in react?

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

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

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

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