当我访问/m/song
时,htmlstring 仅包含 Layouts 组件
htmlstring = renderToString(
<Provider store={store}>
<StaticRouter location={ctx.url} context={context}>
{renderRoutes(routesConfig)}
</StaticRouter>
</Provider>
);
const routesConfig = [{
component: Layouts,
routes:[{path: '/m/song', componentName: 'Song', component: Song}]
…
htmlstring 应该包含 Layouts 和 Song 组件。