I managed to get it with no warnings from TSLint. I will not be able to test it until several days since I'm heavily refactoring the app.
I never seen useCustomHook() passed directly in provider's value in tutorials or docs. It seems much more simple to write. Is it a bad practice, or what ?
import useCustomHook, {customHookInitialValues, UseCustomHookType} from './useCustomHook'export const Context = createContext<UseCustomHookType>({customHookInitialValues})export const ContextProvider = ({ children }: Props) =><Context.Provider value={useCustomHook()}>{children}</Context.Provider>