v3.7.1
This release provides the much-needed enhancements to the React router, i.e. support for lazy-loading through integration with Webpack code splitting, 404 error handling, and server-side rendering.
Doc: https://dotnetify.net/core/api/routing
Features
- Support lazy-loaded routes by allowing
onRouteEnter
to return a promise object and defer the routing until the promise (which should be used to dynamically import the view components) is resolved. - Include
onRouteEnter
in theconnect
's options argument. - Add
enableSsr
(client-side) anduseSsr
(server-side) APIs to support server-side rendering. - Router will now request '/404.html' when the path cannot be resolved.
Note: to disable this feature, adddotnetify.react.router.notFound404Url = null
; - Allow the route template to accept wildcard (*) URL pattern to catch 404 errors.