Skip to content

No more path()

Pre-release
Pre-release

Choose a tag to compare

@pshrmn pshrmn released this 19 Apr 17:04
· 1509 commits to master since this release

Instead of expecting you to call the path (or parentPath) function, the route path property should now just be a (valid path-to-regexp) string.

In order to pass options to path-to-regexp, you can supply a pathOptions property to a route.

{
  name: 'Strict',
  path: 'here/',
  pathOptions: { strict: true }
}

If a route has a children property, then its path will always be created with the { end: false } option.