Skip to main content

Self review: Multiple components - React Basic

Updated 1 min readMarkdown
Part of seriesReact Basics
Self review: Multiple components - React Basic
  1. True or False: In React, you need to import a component multiple times – as many times as you plan to render it from its parent’s return statement.

    • True

    • False

  2. True or false: You can render more than one child component from the parent component.

    • True

    • False

  3. What is wrong with this code?

     function App() {
         return (
             <BlogCard />
             <BlogCard />
             <BlogCard />
         )
     }
    
    • There is no props object passed to the App component.

    • There is no root element.

    • There is no JSX attribute used when rendering the BlogCard components.

About the author

No comments yet. Be the first to comment.

React Basics

Part 15 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 nextSelf review: Passing props - React BasicTrue or False: In React, props is an object. True False True or False: You can pass a prop to a component by adding an attribute to the component being rendered, with the attribute’s value becoming the value of the passed-in prop True False ...

More from this blog