Tsallaka zuwa abun ciki
Justice Tech School

Typing Props

Document props with TypeScript or PropTypes.

Example
import PropTypes from "prop-types";
function Tag({ label }) {
  return <span>{label}</span>;
}
Tag.propTypes = { label: PropTypes.string.isRequired };

Exercise

Mark required.

PropTypes.string.

Quiz Test

What do prop types give?

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