File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -90,17 +90,22 @@ const hot = sourceModule => {
9090
9191 clearExceptions ( )
9292 const failbackTimer = chargeFailbackTimer ( sourceModule . id )
93+ let firstHotRegistered = false
9394
9495 // TODO: Ensure that all exports from this file are react components.
9596
9697 return ( WrappedComponent , props ) => {
9798 clearFailbackTimer ( failbackTimer )
9899 // register proxy for wrapped component
99- reactHotLoader . register (
100- WrappedComponent ,
101- getComponentDisplayName ( WrappedComponent ) ,
102- `RHL${ moduleId } ` ,
103- )
100+ // only one hot per file would use this registration
101+ if ( ! firstHotRegistered ) {
102+ firstHotRegistered = true
103+ reactHotLoader . register (
104+ WrappedComponent ,
105+ getComponentDisplayName ( WrappedComponent ) ,
106+ `RHL${ moduleId } ` ,
107+ )
108+ }
104109
105110 return createHoc (
106111 WrappedComponent ,
You can’t perform that action at this time.
0 commit comments