Dynamic routing

Route can define getChildRoutes, getIndexRoute and getComponents. They are all executed asynchronously and only called when needed. We call this approach "gradual matching.". React Router will gradually match the URL and only load the path configuration and components required by the corresponding page of the URL.

When overriding routerConfig, you need to change the component to getComponent.