MCPcopy Create free account
hub / github.com/carbonplan/maps / LoadingProvider

Function LoadingProvider

src/loading/context.js:121–138  ·  view source on GitHub ↗
({ children })

Source from the content-addressed store, hash-verified

119}
120
121export const LoadingProvider = ({ children }) => {
122 const [state, dispatch] = useReducer(reducer, {
123 loading: new Set(),
124 metadata: new Set(),
125 chunk: new Set(),
126 })
127
128 return (
129 <LoadingContext.Provider
130 value={{
131 ...state,
132 dispatch,
133 }}
134 >
135 {children}
136 </LoadingContext.Provider>
137 )
138}
139
140export const useLoadingContext = () => {
141 const { loading, metadata, chunk } = useContext(LoadingContext)

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected