Skip to content

API Reference / @gtkx/navigation / PathConfig

Type Alias: PathConfig<ParamList> ​

PathConfig<ParamList> = Partial<PathConfigAlias> & object

Type Declaration ​

alias? ​

optional alias?: (string | PathConfigAlias)[]

Additional path alias that will be matched to the same screen.

initialRouteName? ​

optional initialRouteName?: keyof ParamList

Name of the initial route to use for the navigator when the path matches.

screens? ​

optional screens?: PathConfigMap<ParamList>

Path configuration for child screens.

stringify? ​

optional stringify?: Record<string, (value) => string>

An object mapping the param name to a function which converts the param value to a string. By default, arrays and null are preserved for query params, and other values are converted using String(value).

Example ​

js
stringify: {
  date: (value) => value.toISOString()
}

Type Parameters ​

ParamList ​

ParamList extends object