What is a placeholder for primitive types other than string in React useState hook?

Viewed 21

so lets say I have a Person in my app. The type looks like this:

type Person = {
  name: string,
  email: string,
  height: number,
  accountBalance: number,
  isParent: boolean
}

When I want to want to use this person in my state in a form for example:

const [person, setPerson] = useState<Person>(...) // What to put here

As default values for the name and email I would just empty strings:

useState({name: "", email: "", ...}

However, what are my options for placeholders for height, accountBalance and isParent? If I set isParent to false for example or accountBalance to 0 they would portray a meaningful value that could be false.

0 Answers
Related