Skip to content

Commit 20138e1

Browse files
committed
fix: fix SSR with HMR #85
1 parent 5f25f44 commit 20138e1

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/server/index.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
/* eslint-disable react/no-danger, no-underscore-dangle */
22
import React from 'react'
33
import { LOADABLE } from '../constants'
4+
import { reset as resetTracker } from '../componentTracker'
45
import DeferredState from './DeferredState'
56

67
function isReactElement(element) {
@@ -172,6 +173,9 @@ export function getLoadableState(
172173
fetchRoot = true,
173174
tree = {},
174175
) {
176+
// Prevent duplicated components
177+
resetTracker()
178+
175179
const queries = getQueriesFromTree({ rootElement, rootContext }, fetchRoot)
176180

177181
// no queries found, nothing to do

0 commit comments

Comments
 (0)