Components & JSX6 / 14
Up next

JSX with attributes

function Avatar() {
  // attributes look like HTML but are JSX props
  return <img src="/me.png" alt="portrait" width={48} />;
}

export default Avatar;
What you're solving

JSX elements take attributes like HTML