Lesson 1.1

React HTML Fundamentals

Test your knowledge about React components and HTML fundamentals

1

Question 1: Benefits of HTML

Which of the following are benefits of HTML? Select all that apply.

Select all that apply:

It is declarative

It has semantic structure

It gives us tools for managing application complexity

It has a robust module system

2

Question 2: Valid React Component

Is this a valid React component?

jsx
export default function search() {
  return <div>
    <label htmlFor="search">Search</label>
    <input id="search" placeholder="Enter some text" />
  </div>
}
Yes or No?

Yes

No

3

Question 3: Single Responsibility Principle

As a rule, every React component must follow the Single Responsibility Principle.

True or False?

Yes

No

4

Question 4: What's Wrong with Component

What's wrong with this React component?

jsx
import Authors from "./Authors"

export default function About () {
  localStorage.setItem('viewed_about', true)

  return <main>
    <h1>About Us</h1>
    <p>We write JavaScript and words about JavaScript.</p>
    <Authors />
  </main>
}
Select the correct answer:

Nothing

Main should be capitalized

React components must be pure functions