-
-
Save morintd/f122aa04027190182e53a05b9fc70158 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { createContext, useContext } from "react"; | |
import { type IBoardRepository } from "../tic-tac-toe/ports/board-repository.port"; | |
type ContextType = { | |
board: IBoardRepository; | |
}; | |
export const DependencyContext = createContext<ContextType>({} as ContextType); | |
export const useDependencyContext = () => useContext(DependencyContext); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment