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

10.16.0 #4063

Merged
merged 1 commit into from
Jul 9, 2023
Merged

10.16.0 #4063

merged 1 commit into from
Jul 9, 2023

Conversation

JoviDeCroock
Copy link
Member

@JoviDeCroock JoviDeCroock commented Jul 8, 2023

Improved child diffing

We have noticed a few scenario's where children would get unmounted and remounted eagerly due to some offset bugs in our child-diffing, with skew-based diffing we plan to address those. This is already part of v11 and has been introduced there by @andrewiggins. This has now been backported to Preact X so we can benefit from the consistency improvements here as well.

Defer setting refs

We used to set refs as part of the children, synchronously this caused several issues when a ref would go down a level, i.e. the following example

const App = () => {
  return phase === 1 ? <div ref={x}><p>Foo</p></div> : <div><div ref={x}><p>Foo</p></div>
}

In this example when we go from phase 1 to phase 2 we would mount a new ref but only after we bubble back up diffing clean up the outer ref making the ref reset to null.

Fixes

Types

@coveralls
Copy link

Coverage Status

coverage: 99.561%. remained the same when pulling f8db85e on 10.16.0 into 0cdc9df on master.

@github-actions
Copy link

github-actions bot commented Jul 8, 2023

Size Change: +1 B

Total Size: 57.1 kB

Filename Size Change
devtools/dist/devtools.module.js 241 B +1 B
ℹ️ View Unchanged
Filename Size Change
compat/dist/compat.js 3.92 kB 0 B
compat/dist/compat.module.js 3.84 kB 0 B
compat/dist/compat.umd.js 3.98 kB 0 B
debug/dist/debug.js 3.64 kB 0 B
debug/dist/debug.module.js 3.62 kB 0 B
debug/dist/debug.umd.js 3.71 kB 0 B
devtools/dist/devtools.js 232 B 0 B
devtools/dist/devtools.umd.js 315 B 0 B
dist/preact.js 4.35 kB 0 B
dist/preact.min.js 4.38 kB 0 B
dist/preact.min.module.js 4.38 kB 0 B
dist/preact.min.umd.js 4.4 kB 0 B
dist/preact.module.js 4.37 kB 0 B
dist/preact.umd.js 4.41 kB 0 B
hooks/dist/hooks.js 1.53 kB 0 B
hooks/dist/hooks.module.js 1.56 kB 0 B
hooks/dist/hooks.umd.js 1.62 kB 0 B
jsx-runtime/dist/jsxRuntime.js 360 B 0 B
jsx-runtime/dist/jsxRuntime.module.js 326 B 0 B
jsx-runtime/dist/jsxRuntime.umd.js 441 B 0 B
test-utils/dist/testUtils.js 453 B 0 B
test-utils/dist/testUtils.module.js 454 B 0 B
test-utils/dist/testUtils.umd.js 536 B 0 B

compressed-size-action

@JoviDeCroock JoviDeCroock merged commit 051f10c into master Jul 9, 2023
4 checks passed
@JoviDeCroock JoviDeCroock deleted the 10.16.0 branch July 9, 2023 07:57
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.

3 participants