Options
All
  • Public
  • Public/Protected
  • All
Menu

Module webapp

Index

Awayto React Type aliases

Awayto Redux Type aliases

Redux Variables

Awayto Functions

Redux Functions

Awayto React Type aliases

IBaseComponent

IBaseComponent: FunctionComponent<IProps>

IBaseComponents

IBaseComponents: {}

Type declaration

LazyComponentPromise

LazyComponentPromise: Promise<{ default: IBaseComponent }>

TempComponent

TempComponent: IBaseComponent | string | undefined

Awayto Redux Type aliases

ILoadedReducers

ILoadedReducers: Partial<IReducers>

IReducers

IReducers: ReducersMapObject<ISharedState, ISharedActions>

Redux Variables

Const history

history: History<unknown> = ...

Const persistor

persistor: Persistor = ...

Const store

store: ThunkStore = ...

Awayto Functions

awayto

  • awayto(renderComponent: JSX.Element): Promise<void>
  • Awayto bootstrapping function. Loads module structure into redux then bootstraps react. This is done to support the dynamic module structure in general, which includes reducers.

    The dev could potentially load the site on any given page which may use any given reducer. So the reducers should be loaded as they will perform the functionality to return any data which may be necessary for the React.lazy component to get past Suspense.

    In the future, we want to be more intelligent about how to pick which reducer to load, but it's not a major optimization.

    Parameters

    • renderComponent: JSX.Element

      The typical element structure you would give when calling React's render()

    Returns Promise<void>

Redux Functions

Const addReducer

  • addReducer(reducers: Partial<ReducersMapObject<ISharedState, ISharedActions>>): void
  • Parameters

    • reducers: Partial<ReducersMapObject<ISharedState, ISharedActions>>

    Returns void

Generated using TypeDoc