Some segments of the state might be dynamic. Say the current locale for example.
Validating such state could be handled in a stateValidationResponder. Alternatively it might be an idea to introduce variable state segments.{locale}/home for example. These variables could be entered when needed. For example:
var home = new navigatorjs.NavigationState("{locale}/home")
var currentState = new navigatorjs.NavigationState("en_EN/home")
expect(currentState.equals(home, {locale:'en_EN'})).toBe(true)
expect(currentState.equals(home, {locale:'nl_NL'})).not.toBe(true)
Would this be a good idea?
Some segments of the state might be dynamic. Say the current locale for example.
Validating such state could be handled in a stateValidationResponder. Alternatively it might be an idea to introduce variable state segments.
{locale}/homefor example. These variables could be entered when needed. For example:Would this be a good idea?