import React , { FC } from 'react' ; import { Provider } from 'react-redux' ; import { ProxyContext , ModelContext , LoadingContext } from './contexts' ; import { modelStore } from '../store/modelStore' ; import { PersistGate , PersistGateProps } from '../persist/PersistGate' ; import { proxyStore } from '../store/proxyStore' ; import { loadingStore } from '../store/loadingStore' ; interface OwnProps extends PersistGateProps { } see store . init export const FocaProvider = ( { children , loading } ) => { return ( < Provider context = { ProxyContext } store = { proxyStore } > < Provider context = { LoadingContext } store = { loadingStore } > < Provider context = { ModelContext } store = { modelStore } > { modelStore . persistor ? ( < PersistGate loading = { loading } children = { children } / > ) : ( children ) } < /Provider> < /Provider> < /Provider>); } ;