You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
1.Why should the app return a component instance when matched(no mater match path or always alive).
return children && !isEmptyChildren(children)
? children
: matchAnyway
? component
? componentInstance
: render
? render(props as any)
: null
: null
In my opinion, from hide -> show, the very only method is performing SHOW_DOM.But in fact , when i use return null, it will not show or hide dom, but destroyed the dom.
if (matchOfPath) {
debugLog('--- normal match —‘)
//***//
} else {
debugLog('--- hide match ---')
// force unmount
// show ➡️ hide
if (this.liveState === LiveState.NORMAL_RENDER_MATCHED) {
this.currentSideEffect = [SideEffect.ON_HIDE_HOOK, SideEffect.SAVE_DOM_SCROLL, SideEffect.HIDE_DOM]
}
this.liveState = LiveState.HIDE_RENDER
**return null**
}
2.Why should the app instantiate with props using 'match: matchOfPath'?
What does it used for? I use 'this.props' instead of 'props', it still works.
Description
1.Why should the app return a component instance when matched(no mater match path or always alive).
In my opinion, from hide -> show, the very only method is performing SHOW_DOM.But in fact , when i use return null, it will not show or hide dom, but destroyed the dom.
2.Why should the app instantiate with props using 'match: matchOfPath'?
What does it used for? I use 'this.props' instead of 'props', it still works.
The text was updated successfully, but these errors were encountered: