Creating product demos by mocking your API (feat. tRPC) | Samuel Mortenson
The author explains how to build interactive product demos for single-page applications by mocking backend APIs using tRPC links. By defining an exhaustive TypeScript type mapping for route inputs and outputs, developers can ensure all organization-specific routes have mock data while allowing unmocked routes or empty responses to pass through cleanly. Open article →