-
-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: Memoed Component bails while detached #4711
base: main
Are you sure you want to change the base?
Conversation
📊 Tachometer Benchmark ResultsSummaryduration
usedJSHeapSize
Resultscreate10kduration
usedJSHeapSize
filter-listduration
usedJSHeapSize
hydrate1kduration
usedJSHeapSize
many-updatesduration
usedJSHeapSize
replace1kduration
usedJSHeapSize
run-warmup-0
run-warmup-1
run-warmup-2
run-warmup-3
run-warmup-4
run-final
text-updateduration
usedJSHeapSize
tododuration
usedJSHeapSize
update10th1kduration
usedJSHeapSize
|
compat/src/suspense.js
Outdated
// issue #4631 | ||
if (vnode.type.name === 'Memoed') vnode._component._force = true; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
// issue #4631 | |
if (vnode.type.name === 'Memoed') vnode._component._force = true; | |
vnode._component._force = true; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This does not fix #3449 yet, for that you would need a different mechanism in error-boundaries. That being said this also needs tests
Thanks |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are no tests asserting that the behaviour is corrected, also see my comment, there is no need for the comment nor for making this exclusive to memoed as this would also trigger for normal sCU components
compat/test/browser/suspense.test.js
Outdated
@@ -2159,4 +2160,38 @@ describe('suspense', () => { | |||
expect(scratch.innerHTML).to.equal('<div><p>hello world</p></div>'); | |||
}); | |||
}); | |||
|
|||
it('should correctly render memod child component', () => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This test does not test the behaviour, it even passes on main. You might want to look at the reproduction to more closely reproduce the failure. Currently this component renders successfully and retains said state, what we want to assert is that it can attain new state
Set
Memo
Component to_force
in case it bails during detachedClone.fix issue #4631