I am new to React and Typescript and I can't find the correct way I should be passing these into the React.Componet state. My code still works as expected but I would like to know what I am doing wrong!
class App extends React.Component<{}, { isLoading: boolean, thisCoffeeShop: ICoffeeShop }> {constructor(props: Readonly<{}>) { super(props); this.state = { isLoading: true } }//....}
}
I assume its Typescript throwing me
"Property 'thisCoffeeShop' is missing in type '{ isLoading: true; }' but required in type 'Readonly<{ isLoading: boolean; thisCoffeeShop: ICoffeeShop; }>'."