This namespace a helper method for SSR using @loadable/component

import { ChunkExtractor } from "@loadable/server";
import {renderLoadableReduxComponent} from "@quintype/framework/server/render";
import path from "path";

const statsFile = path.resolve("stats.json"); // This is the stats file generated by webpack loadable plugin
const extractor = new ChunkExtractor({ statsFile, entrypoints: ["topbarCriticalCss", "navbarCriticalCss"] }); // We create an extractor from the statsFile
renderLoadableReduxComponent(Header,, extractor)

View Source server/render.js, line 35


# static renderLoadableReduxComponent(Component, store, props, props)

Name Type Description
Component Component

The Component to render

store Redux

The store to render

props extractor

Instance of ChunkExtractor from loadable

props Object

The props to pass to the component

View Source server/render.js, line 55