Styling React Component, Props, & States Flashcards Preview

Front-End: React JS > Styling React Component, Props, & States > Flashcards

Flashcards in Styling React Component, Props, & States Deck (7)
Loading flashcards...
1

A _______ renders a reusable piece of the UI.
a. JSX tag
b. JSX expression
c. Component
d. Module

c. Component

2

How do you create a React component?

As either a JavaScript function or class

3

T or F: React uses a templating language for creating components.

False. React components are written in plain JavaScript, with the help of JSX

4

Which component do you usually pass to ReactDOM.render()?

Top-level component

5

When should you break a component into smaller components?

When the component has too many responsibilities.

6

When a component contains other components, it's called:

Composition

7

Why is a capital letter necessary in the component name?

To differentiate custom components from native DOM elements