Tsallaka zuwa abun ciki
Justice Tech School

JSX Rules

JSX must return one root element, close every tag and use className instead of class.

Example
function Card() {
  return (
    <div className="card">
      <img src="a.png" alt="logo" />
      <h2>Title</h2>
    </div>
  );
}

Exercise

Attribute for CSS class.

<div ="box">

Quiz Test

What replaces class in JSX?

These free lessons are for learning. Join a full course for projects, mentor feedback and a verified certificate.