Put in order · JavaScript and React course · Module 15: Patterns and Architecture

Polymorphic Component as Syntax

Arrange the syntax for rendering a polymorphic component with the as prop:

Items to put in order

  • {...props}>
  • </Component>);
  • className={cls}
  • <Component
  • {children}
  • return (

You can check the correct answer by solving this task in the CodeWorlds game.