Skip to content
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

ensure we iterate over all hooks #3675

Merged
merged 3 commits into from
Aug 17, 2022
Merged

Conversation

JoviDeCroock
Copy link
Member

Fixes #3674

Due to .every we bailed out of the loop on the first time we find a false which in this case means we update from 0 --> 42 for the unused hook and never set the _nextValue to _value for the second update

CC @robertknight

@coveralls
Copy link

coveralls commented Aug 17, 2022

Coverage Status

Coverage increased (+0.001%) to 99.291% when pulling 8bbcc8a on iterate-over-all-hooks into a4c3e7b on master.

@github-actions
Copy link

github-actions bot commented Aug 17, 2022

Size Change: +35 B (0%)

Total Size: 43.9 kB

Filename Size Change
hooks/dist/hooks.js 1.4 kB +10 B (0%)
hooks/dist/hooks.module.js 1.43 kB +16 B (1%)
hooks/dist/hooks.umd.js 1.48 kB +9 B (0%)
ℹ️ View Unchanged
Filename Size Change
compat/dist/compat.js 3.72 kB 0 B
compat/dist/compat.module.js 3.7 kB 0 B
compat/dist/compat.umd.js 3.78 kB 0 B
debug/dist/debug.js 3 kB 0 B
debug/dist/debug.module.js 3 kB 0 B
debug/dist/debug.umd.js 3.08 kB 0 B
devtools/dist/devtools.js 230 B 0 B
devtools/dist/devtools.module.js 239 B 0 B
devtools/dist/devtools.umd.js 306 B 0 B
dist/preact.js 4 kB 0 B
dist/preact.min.js 4.03 kB 0 B
dist/preact.module.js 4.02 kB 0 B
dist/preact.umd.js 4.06 kB 0 B
jsx-runtime/dist/jsxRuntime.js 317 B 0 B
jsx-runtime/dist/jsxRuntime.module.js 327 B 0 B
jsx-runtime/dist/jsxRuntime.umd.js 395 B 0 B
test-utils/dist/testUtils.js 444 B 0 B
test-utils/dist/testUtils.module.js 444 B 0 B
test-utils/dist/testUtils.umd.js 521 B 0 B

compressed-size-action

Copy link
Member

@robertknight robertknight left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I confirm this fixes the downstream test failures that were distilled into #3674. The diff looks sensible to me, although I don't have a clear understanding what the high-level intention of the shouldComponentUpdate handler generated by this code is. A comment above the block of code explaining the high-level picture would be useful.

@JoviDeCroock JoviDeCroock merged commit 1cb4b38 into master Aug 17, 2022
@JoviDeCroock JoviDeCroock deleted the iterate-over-all-hooks branch August 17, 2022 17:24
This was referenced Aug 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

State update issue in Preact 10.10.3
3 participants