Skip to main content

Command Palette

Search for a command to run...

Knowledge check: State or stateless - React Basic

Updated
1 min read
Knowledge check: State or stateless - React Basic
D

A passionate full-stack developer from @ePlus.DEV

  1. What is a stateless component?

    • A component that doesn’t track its parent’s state.

    • A component that doesn’t track its own state.

  2. A stateful component must have a props object.

    • False

    • True

  3. To turn a stateless component into a stateful component, you must pass it a props object.

    • True

    • False

  4. The process of lifting up state can lead to: Select all that apply.

    • A stateful child component controlling the state of a stateful parent component.

    • A stateful child component controlling the state of a stateless parent component.

    • A stateful component becoming a stateless component.

    • A stateless component becoming a stateful component.

  5. A prop doesn't have to always pass state.

    • True

    • False

React Basics

Part 6 of 18

In this module you will explore the basic structure and use of the React.js library. You will learn how to produce single page web applications using React components and to use JSX to style them.

Up next

Self review: Managing state in React

True or false? When lifting state up, you need to move the useState from a child component to a parent component. True. False. If the state variable holds an array or a string value, once you pass that state via props from a parent to a child, y...

More from this blog

E

ePlus.DEV - Exploring Technology with David Nguyen

1232 posts

A passionate full-stack developer from VIETNAM.