7 entries · 11-question quiz
Styling React Components
React ↔ Angular reference. React examples use React 19 + TypeScript (Vite). Angular examples use modern Angular (standalone components, signals, input(), @if/@for).
Test yourself
11 questions
- 1Vanilla CSS and Scoping
Regular
.cssfiles imported into a component file. - 2Inline Styles
Styles passed directly to an element through the
styleprop as a JavaScript object. - 3Conditional (Dynamic) Classes
Adding or removing CSS classes based on state.
- 4CSS Modules
CSS files named
*.module.csswhose class names are scoped to the component that imports them. - 5Styled Components (CSS-in-JS)
A library (
styled-components) that creates React components with styles attached, written in JavaScript template literals. - 6Tailwind CSS
A utility-first CSS framework: you style elements by combining small, single-purpose classes directly in markup.
- 7Choosing an Approach