The idea behind binding with React is that we have a state that we need to bind to. In the case of creating data that we want to display on the screen, our state can be as simple as an interface describing the properties that we want to use. For a single contact, this translates to our state looking like this:
export interface IPersonState { FirstName: string, LastName: string, Address1: string, Address2: StringOrNull, Town: string, County: string, PhoneNumber: string; Postcode: string, DateOfBirth: StringOrNull, PersonId : string}
Note that we have created a union type called StringOrNull as a convenience. We will place this in a file called Types.tsx so that it looks like this:
export type StringOrNull ...