Creating Mock Widgets and People
Explore how to create and use mock data types IWidget and IPerson to test searching, sorting, and filtering functionalities. Understand the value of mock data for local testing and visualization before building generic functions.
We'll cover the following...
We'll cover the following...
Before we dive into creating our first major functionality, a generic search, we should do some work to include data and some simple rendering in our application. The mock data will give us concrete values that make it easier to test the functions we write.
The benefits of creating mock data
So far, we’ve used relatively simple types in our generic TypeScript examples. But when writing complex functions, like generic ...