diff --git a/src/server/index.js b/src/server/index.js index 6f40bab6..ecd21cc4 100644 --- a/src/server/index.js +++ b/src/server/index.js @@ -1,6 +1,7 @@ /* eslint-disable react/no-danger, no-underscore-dangle */ import React from 'react' import { LOADABLE } from '../constants' +import { reset as resetTracker } from '../componentTracker' import DeferredState from './DeferredState' function isReactElement(element) { @@ -172,6 +173,9 @@ export function getLoadableState( fetchRoot = true, tree = {}, ) { + // Prevent duplicated components + resetTracker() + const queries = getQueriesFromTree({ rootElement, rootContext }, fetchRoot) // no queries found, nothing to do