Reuse service address
This commit is contained in:
parent
ff9161d8e7
commit
b4097e25d6
3 changed files with 6 additions and 6 deletions
|
@ -74,7 +74,7 @@ export class RootStoreModel {
|
|||
}
|
||||
}
|
||||
|
||||
const throwawayInst = new RootStoreModel(AtpApi.service('http://localhost')) // this will be replaced by the loader
|
||||
const throwawayInst = new RootStoreModel(AtpApi.service('http://localhost')) // this will be replaced by the loader, we just need to supply a value at init
|
||||
const RootStoreContext = createContext<RootStoreModel>(throwawayInst)
|
||||
export const RootStoreProvider = RootStoreContext.Provider
|
||||
export const useStores = () => useContext(RootStoreContext)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue