Creators

Name

Type

Args

Return Type

<R = any, C = any>

routes, nameOptions

Notes<R, C>

<R = any, C = any>

routes, { key, nearby, routeName }

<R = any, C = any>

routes, { key, nearby, routeName }

Creates a route note unit. It uses internally by createRoot / createFeature

Generic Type:

<R = any, C = any>

Args:

(
  routes: Route[],
  nameOptions: DefaultNameOptions = {}
)

Return Type:

Notes<R, C>

Creates the root unit and invokes only once to initialize a hub.

Generic Type:

: <R = any, C = any>

Args:

(
  routes: Route[],
  { key, nearby, routeName }: Partial<CreatorOptionArgs> = {}
)

Return Type:

: Unit<R, C>

Usage example:

export const appUnit: Unit<AppNotes, AppChildNotes> = 
    createRoot<AppNotes, AppChildNotes>(routes, { key: KEY });

Invokes once for each feature (eager/lazy) module.

Generic Type:

: <R = any, C = any>

Args:

(
  routes: Route[],
  { key, nearby, routeName }: Partial<CreatorOptionArgs> = {}
)

Return Type:

: Connector<R, C>

Usage example:

export const aboutConnector: Unit<AboutNotes> = 
    createFeature<AboutNotes>(routes, { key: ABOUT_HUB_KEY});

Last updated