In my React Typescript project I have a Context and a Context Provider function:
Context:
export const MyContext = createContext<null | MyContextType>(null);
Context Provider
export const MyContextProvider = ({ children }: Props) => {
// code here
}
Is it better, more a convention to create a folder contexts and export both function from a context file e.g. MyContext.tsx
Or create another folder: providers and create another provider file there MyContextProvider.tsx?