Forms
Controlled inputs, validation, multi-step flows, accessibility and React 19 form actions.
1.What is the difference between controlled and uncontrolled React components?
Who owns the value, React state or the DOM, and the trade-offs of each.
2.Contact Form
Build a contact form with accessible inline validation, a submitting state and a success message.
3.Generate Table
Generate a numbered table from row and column inputs, filled row by row, column by column or in a snake pattern.
4.Star Rating
Build a star rating input with hover preview, keyboard support and a clear button, built on native radios.
5.Todo List
Build a todo list with add, complete, delete and filters, using semantic forms and good focus management.
6.What are Actions in React 19? Explain `useActionState` and `useFormStatus`
Async transitions for mutations with built-in pending, error and form-reset handling.
7.Do TypeScript types exist at runtime? How do you validate external data?
Type erasure, trust boundaries, schema validation and type stripping.
8.Sign-up Form Validation
Build a sign-up form with on-blur validation, a live password checklist, cross-field checks and a show-password toggle.
9.Transfer List
Move checked items between two lists with per-list select-all and bulk transfer controls.
10.Users Database (CRUD)
Build a small users database with search, a keyboard-accessible listbox, and create, update, delete and cancel actions.
11.Travel Booking Site (e.g. Airbnb)
Design a stays marketplace: search with map and date range, listing details, availability calendar and a reliable booking flow.
12.How do you prevent the default behavior of an event?
preventDefault, cancelable events, passive listeners and when not to block defaults.
13.Dice Roller
Roll a chosen number of six-sided dice, draw each face with CSS pips and announce the total accessibly.
14.Flight Booker
Build a one-way or return flight form with date constraints, disabled states and a booking confirmation.
15.Mortgage Calculator
Calculate the monthly payment, total cost and total interest of a fixed-rate loan as the user types.
16.Temperature Converter
Two linked inputs, Celsius and Fahrenheit, that update each other and handle invalid input gracefully.
17.Explain the concept of input validation and its importance in security
Server-side allowlist validation with schemas, versus output encoding, and why client checks are UX only.
18.How does `useOptimistic` work in React 19?
Optimistic overlays on real state during Actions, with automatic revert.
19.Accordion II: Single Open, Controlled
Extend an accordion so only one section is open at a time, with optional collapsing and a controlled API.
20.Auth Code Input
Build a one-time-code input split into digit boxes with auto-advance, backspace, arrow keys and paste support.
21.Birth Year Histogram
Bucket a list of birth years into a bar-chart histogram with adjustable bucket size and an accessible data-table view.
22.Multi-step Form Wizard
Build a three-step sign-up wizard with per-step validation, a progress indicator, focus management and a review step.