Build a small CRUD interface backed entirely by local state: list users, filter them by name, create new ones, edit existing ones, and delete them. There's no server — the users array is the database, and every operation is just an immutable transformation of that array. The one subtlety is that a single form does double duty for both "create" and "edit," distinguished by one extra piece of state.
// A self-contained component. No props.
function App(): JSX.Element;
A form, a filter box, and a list of users with Edit/Delete on each row.
type a name + occupation, click Add → new user appended to the list
click Edit on a row → form fills with that user, button becomes "Save"
click Save → that user is updated in place; form clears
type "ad" in the filter → only users whose name contains "ad" (case-insensitive)
click Delete → that user is removed from the list
editingId === null means "create"; otherwise "edit that id." The submit handler branches on it.users.filter(...) on render.