DEV Community

Discussion on: useContext() with Typescript

Collapse
 
ofergal profile image
Ofer Gal

How will you change this when the objects to set and get are much more complex?
I have something like :
export interface IDocumentInfo {
file: IFilePickerResult;
pages?: number;
instructions?: string;
existsOnsite?: boolean;
}
export interface IRequestInfo {
projectNumber: string;
documents: IDocumentInfo[];
}

and I want a global context for an IRequestInfo object.
Thank you

Some comments have been hidden by the post's author - find out more