MCPcopy Create free account
hub / github.com/bradtraversy/github-finder-app / GithubProvider

Function GithubProvider

src/context/github/GithubContext.js:6–26  ·  view source on GitHub ↗
({ children })

Source from the content-addressed store, hash-verified

4const GithubContext = createContext()
5
6export const GithubProvider = ({ children }) => {
7 const initialState = {
8 users: [],
9 user: {},
10 repos: [],
11 loading: false,
12 }
13
14 const [state, dispatch] = useReducer(githubReducer, initialState)
15
16 return (
17 <GithubContext.Provider
18 value={{
19 ...state,
20 dispatch,
21 }}
22 >
23 {children}
24 </GithubContext.Provider>
25 )
26}
27
28export default GithubContext

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected