I had created a hook that fetches API and I need to call that hook in multiple components but while mounting that component every time the API is re-fetching so I had decided to call that hook as value as React context provider but typescript is not happy when passing value to the provider saying "{ user: { data: any; loading: boolean; error: any; } | { loading: any; data: any; error: any; }; logout: MutationTuple<any, OperationVariables, DefaultContext, ApolloCache>; login: MutationTuple<...>; signup: MutationTuple<...>; }' is not assignable to type 'null"
const AuthContext = React.createContext(null);export const AuthProvider: React.FC = ({ children }) => { return <AuthContext.Provider value={useAuthHook()}> // typescript not happy here {children}</AuthContext.Provider>}