Here inside "using React context" tab you can see:
const TimerContext = createContext<Timer>()
But actually it will not work, because
Expected 1 arguments, but got 0.ts(2554)
index.d.ts(419, 9): An argument for 'defaultValue' was not provided.
If I do something like this:
const TimerContext = createContext<Timer | null>(null);
then I should check for null in places where I use context (for example useContext()?.someValue), which is also looks not good.
So what it is the right approach?