How to use several values in React Context

Viewed 32

I'm implementing front-end for big CRM and i want to save several objects in one context file. Currently i use context to save "shift" object.

import {createContext} from "react";
import {ShiftContextInterface} from "./ShiftContextInterface";

export const ShiftContext = createContext<ShiftContextInterface | undefined>(undefined);

Now i want to add additional value as Dispatch<SetStateAction<string | undefined>>(undefined);

How can i make my context save 2 values?

0 Answers
Related