react-use#createStateContext TypeScript Examples

The following examples show how to use react-use#createStateContext. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: EmissionsContext.tsx    From mStable-apps with GNU Lesser General Public License v3.0 5 votes vote down vote up
[useEmissionsData, EmissionsDataProvider] = createStateContext<EmissionsData | undefined>(undefined)
Example #2
Source File: EmissionsContext.tsx    From mStable-apps with GNU Lesser General Public License v3.0 5 votes vote down vote up
[useEmissionsController, EmissionsControllerProvider] = createStateContext<EmissionsController | undefined>(undefined)
Example #3
Source File: EpochContext.tsx    From mStable-apps with GNU Lesser General Public License v3.0 5 votes vote down vote up
[useEpochData, EpochDataProvider] = createStateContext<Epoch | undefined>(undefined)
Example #4
Source File: EpochContext.tsx    From mStable-apps with GNU Lesser General Public License v3.0 5 votes vote down vote up
[useEpochWeekNumber, EpochWeekNumberProvider] = createStateContext<number | undefined>(undefined)
Example #5
Source File: ViewOptionsContext.tsx    From mStable-apps with GNU Lesser General Public License v3.0 5 votes vote down vote up
[useHoveredDialId, HoveredDialIdProvider] = createStateContext<number | undefined>(undefined)
Example #6
Source File: ViewOptionsContext.tsx    From mStable-apps with GNU Lesser General Public License v3.0 5 votes vote down vote up
[useSelectedDialId, SelectedDialIdProvider] = createStateContext<number | undefined>(undefined)
Example #7
Source File: BaseProviders.tsx    From mStable-apps with GNU Lesser General Public License v3.0 5 votes vote down vote up
[useBaseCtx, BaseCtxProvider, baseCtx] = createStateContext<BaseContext>({ navItems: [] })
Example #8
Source File: AccountProvider.tsx    From mStable-apps with GNU Lesser General Public License v3.0 5 votes vote down vote up
[useSignerCtx, SignerProvider] = createStateContext<
  | {
      provider: Provider
      parentChainProvider?: Provider
      signer?: ethers.Signer
    }
  | undefined
>(undefined)
Example #9
Source File: AccountProvider.tsx    From mStable-apps with GNU Lesser General Public License v3.0 5 votes vote down vote up
[useInjectedChainIdCtx, InjectedChainIdProvider] = createStateContext<number | undefined>(undefined)
Example #10
Source File: AccountProvider.tsx    From mStable-apps with GNU Lesser General Public License v3.0 5 votes vote down vote up
[useInjectedProviderCtx, InjectedProviderProvider] = createStateContext<EthersWeb3Provider | undefined>(undefined)
Example #11
Source File: BannerProvider.tsx    From mStable-apps with GNU Lesser General Public License v3.0 5 votes vote down vote up
[useBannerMessage, BannerProvider] = createStateContext<BannerMessageProps | undefined>(undefined)
Example #12
Source File: NetworkProvider.tsx    From mStable-apps with GNU Lesser General Public License v3.0 5 votes vote down vote up
[useChainIdCtx, ChainIdProvider] = createStateContext<ChainIds | undefined>(
  Number.isFinite(maybeCachedChainId) ? (maybeCachedChainId as ChainIds) : ChainIds.EthereumMainnet,
)
Example #13
Source File: MassetProvider.tsx    From mStable-apps with GNU Lesser General Public License v3.0 5 votes vote down vote up
[useSelectedMassetNameCtx, SelectedMassetNameProvider] = createStateContext<MassetName>(defaultValue)