File tree Expand file tree Collapse file tree 3 files changed +17
-0
lines changed
examples/all-possible-containers/src/components Expand file tree Collapse file tree 3 files changed +17
-0
lines changed Original file line number Diff line number Diff line change 1+ import React from 'react'
2+ import { EDIT_ME } from './_editMe'
3+ import Counter from './Counter'
4+
5+ const LazyComponent = ( ) => (
6+ < div >
7+ < fieldset >
8+ < legend > Lazy Component</ legend >
9+ { EDIT_ME }
10+ < Counter />
11+ </ fieldset >
12+ </ div >
13+ )
14+
15+ export default LazyComponent
Original file line number Diff line number Diff line change @@ -31,6 +31,7 @@ const markUpdate = ({ fiber }) => {
3131 fiber . expirationTime = 1
3232 if ( fiber . alternate ) {
3333 fiber . alternate . expirationTime = 1
34+ fiber . alternate . type = fiber . type
3435 }
3536 fiber . memoizedProps = Object . assign (
3637 { cacheBusterProp : true } ,
Original file line number Diff line number Diff line change @@ -9,6 +9,7 @@ const lazyConstructor = '_ctor'
99export const updateLazy = ( target , type ) => {
1010 const ctor = type [ lazyConstructor ]
1111 if ( target [ lazyConstructor ] !== type [ lazyConstructor ] ) {
12+ // just execute `import` and RHL.register will do the job
1213 ctor ( )
1314 }
1415 if ( ! target [ lazyConstructor ] . isPatchedByReactHotLoader ) {
You can’t perform that action at this time.
0 commit comments