Within my TypeScript React App, I have a long form that needs to dynamically hide/show or enable/disable elements based on the value of the status.
export interface IState {
Status: string;
DisableBasicForm: boolean;
DisableFeedbackCtrl: boolean;
DisableTypeofReqCtrl: boolean;
DisablePurposeCtrl: boolean;
DisableDutyStation: boolean;
DisableContractManager: boolean;
...
}
In the class constructor, I need to initialize the State. What is the best way to do this without individually initializing each variable present in IState?
public constructor(props: IGoodsProps) {
super(props);
//Looking for minimal code required here.
}