PHP Classes

File: client/src/app/stores/store.ts

Recommend this page to a friend!
  Classes of mohammad anzawi   PHP Wallet API and Application   client/src/app/stores/store.ts   Download  
File: client/src/app/stores/store.ts
Role: Auxiliary data
Content type: text/plain
Description: Auxiliary data
Class: PHP Wallet API and Application
Application to manage a wallet by calling an API
Author: By
Last change:
Date: 2 years ago
Size: 903 bytes
 

Contents

Class file image Download
/** * Stores Container */ import {createContext, useContext} from "react"; import ErrorsStore from "./ErrorsStore"; import UserStore from "./UserStore"; import CommonStore from "./CommonStore"; import PaymentStore from "./PaymentStore"; import ModalStore from "./ModalStore"; import TransactionStore from "./TransactionStore"; interface Store { errorsStore: ErrorsStore userStore: UserStore commonStore: CommonStore paymentStore: PaymentStore modalStore: ModalStore transactionStore: TransactionStore } export const store: Store = { userStore: new UserStore(), errorsStore: new ErrorsStore(), commonStore: new CommonStore(), paymentStore: new PaymentStore(), modalStore: new ModalStore(), transactionStore: new TransactionStore(), } export const StoreContext = createContext(store) export function useStore() { return useContext(StoreContext) }