-
-
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
Prevent memo'd components that unsuspend from bailing #4711
Conversation
📊 Tachometer Benchmark ResultsSummary⏳ Benchmarks are currently running. Results below are out of date. duration
usedJSHeapSize
Results⏳ Benchmarks are currently running. Results below are out of date. create10kduration
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
@JoviDeCroock Hi there, could you plz check this pr? Thanks for your time~ |
Set
Memo
Component to when unsuspending_force
so when the subsequent render arrives there is no possibility of bailing out of the render pass.fixes #4631