Options
All
  • Public
  • Public/Protected
  • All
Menu

Namespace Store

A composition of various hooks to manage shared application state.

Index

Type aliases

SetTheme: Dispatch<SetStateAction<DefaultTheme>>

Explicitly sets the theme.

SetThemeKey: (themeKey: ThemeKey) => void

Type declaration

    • Saves the theme key as selectedThemeKey using localStorage and sets the state to the theme object.

      Parameters

      Returns void

StoreProps: { children: any }

Type declaration

ThemeKey: keyof typeof themes

Every available theme key.

Functions

  • Store(__namedParameters: StoreProps): ReactElement<any, string | JSXElementConstructor<any>>
  • Provides application state as a composition of various stateful hooks.

    Parameters

    Returns ReactElement<any, string | JSXElementConstructor<any>>

  • getSelectedTheme(): DefaultTheme
  • Gets the selected theme key from local storage and returns the selected theme object.

    Returns DefaultTheme

  • onWindowFocus(): void
  • shouldResetInitialRender(): boolean
  • If the user's preferred theme does not match the prerendered default theme, the app's HTML will need to be reset instead of hydrating the existing HTML.

    Returns boolean

Generated using TypeDoc