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

fix equality for non root children #3739

Merged
merged 2 commits into from
Sep 23, 2022
Merged

fix equality for non root children #3739

merged 2 commits into from
Sep 23, 2022

Conversation

JoviDeCroock
Copy link
Member

@JoviDeCroock JoviDeCroock commented Sep 19, 2022

fixes #3731

We only want to run the state optimization when the invoker is the root of the update, this means that when a parent trickles through to its children it could have altered props which means we can't bail out of eventually consistent states.

We started checking whether we are the root of an update this is easily checked because we shallowly copy the vnode which means our props will be referentially equal at the root of an update

@coveralls
Copy link

coveralls commented Sep 19, 2022

Coverage Status

Coverage remained the same at 99.527% when pulling 6f7dd61 on fix-equality into 2cafede on master.

@github-actions
Copy link

github-actions bot commented Sep 19, 2022

Size Change: +30 B (0%)

Total Size: 52.9 kB

Filename Size Change
hooks/dist/hooks.js 1.56 kB +10 B (0%)
hooks/dist/hooks.module.js 1.59 kB +10 B (0%)
hooks/dist/hooks.umd.js 1.64 kB +10 B (0%)
ℹ️ View Unchanged
Filename Size Change
compat/dist/compat.js 3.78 kB 0 B
compat/dist/compat.module.js 3.72 kB 0 B
compat/dist/compat.umd.js 3.85 kB 0 B
debug/dist/debug.js 3.01 kB 0 B
debug/dist/debug.module.js 3.01 kB 0 B
debug/dist/debug.umd.js 3.09 kB 0 B
devtools/dist/devtools.js 231 B 0 B
devtools/dist/devtools.module.js 239 B 0 B
devtools/dist/devtools.umd.js 314 B 0 B
dist/preact.js 4.02 kB 0 B
dist/preact.min.js 4.05 kB 0 B
dist/preact.min.module.js 4.04 kB 0 B
dist/preact.min.umd.js 4.08 kB 0 B
dist/preact.module.js 4.04 kB 0 B
dist/preact.umd.js 4.09 kB 0 B
jsx-runtime/dist/jsxRuntime.js 358 B 0 B
jsx-runtime/dist/jsxRuntime.module.js 324 B 0 B
jsx-runtime/dist/jsxRuntime.umd.js 439 B 0 B
test-utils/dist/testUtils.js 442 B 0 B
test-utils/dist/testUtils.module.js 444 B 0 B
test-utils/dist/testUtils.umd.js 526 B 0 B

compressed-size-action

@JoviDeCroock JoviDeCroock merged commit a868b02 into master Sep 23, 2022
@JoviDeCroock JoviDeCroock deleted the fix-equality branch September 23, 2022 07:54
JoviDeCroock added a commit that referenced this pull request Oct 26, 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
4 participants