Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
return function renderToComponent(renderer: DOMRenderer): any {
const cacheCluster = clusterCache(renderer.cache, renderer.mediaQueryOrder)
const rehydrationIndex = getRehydrationIndex(renderer)
const componentList = reduce(
sheetMap,
(list, type, key) => {
if (cacheCluster[key].length > 0) {
list.push(
createStyleElement(cacheCluster[key], rehydrationIndex, type)
)
}
return list
},
[]
)
return reduce(