Import and Export
Split components into files with default and named exports.
Example
// Button.jsx
export default function Button() {
return <button>Go</button>;
}
export const Small = () => <button>s</button>;
// App.jsx
import Button, { Small } from "./Button";Exercise
Default import.
Button from "./Button";Quiz Test
These free lessons are for learning. Join a full course for projects, mentor feedback and a verified certificate.