Skip to content

[Proposal] remove legacy context#5142

Closed
JoviDeCroock wants to merge 1 commit into
mainfrom
proposal/remove-legacy-context
Closed

[Proposal] remove legacy context#5142
JoviDeCroock wants to merge 1 commit into
mainfrom
proposal/remove-legacy-context

Conversation

@JoviDeCroock

Copy link
Copy Markdown
Member

React 19 removed it and it does look like it saves bytes/improves perf

Measured: -9 B gzipped on core (dist/preact.mjs). createContext and compat portals now publish context through an internal mangled _childContext property; the public getChildContext method is no longer called.

🤖 Generated with Claude Code

Drops support for getChildContext/legacy context propagation. Context
providers (createContext and compat's portal ContextProvider) now publish
child context via an internal, mangled _childContext property instead of
the public getChildContext method.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@github-actions

github-actions Bot commented Jul 5, 2026

Copy link
Copy Markdown

📊 Tachometer Benchmark Results

Summary

A summary of the benchmark results will show here once they finish.

Results

The full results of your benchmarks will show here once they finish.

tachometer-reporter-action v2 for CI

@github-actions

github-actions Bot commented Jul 5, 2026

Copy link
Copy Markdown

Size Change: -39 B (-0.08%)

Total Size: 48 kB

📦 View Changed
Filename Size Change
compat/dist/compat.js 3.93 kB -3 B (-0.08%)
compat/dist/compat.mjs 3.86 kB -6 B (-0.16%)
compat/dist/compat.umd.js 4 kB -3 B (-0.07%)
dist/preact.js 4.86 kB -9 B (-0.18%)
dist/preact.mjs 4.88 kB -10 B (-0.2%)
dist/preact.umd.js 4.92 kB -8 B (-0.16%)
ℹ️ View Unchanged
Filename Size
debug/dist/debug.js 3.91 kB
debug/dist/debug.mjs 3.91 kB
debug/dist/debug.umd.js 3.99 kB
devtools/dist/devtools.js 263 B
devtools/dist/devtools.mjs 273 B
devtools/dist/devtools.umd.js 348 B
hooks/dist/hooks.js 1.52 kB
hooks/dist/hooks.mjs 1.55 kB
hooks/dist/hooks.umd.js 1.59 kB
jsx-runtime/dist/jsxRuntime.js 892 B
jsx-runtime/dist/jsxRuntime.mjs 861 B
jsx-runtime/dist/jsxRuntime.umd.js 966 B
test-utils/dist/testUtils.js 473 B
test-utils/dist/testUtils.mjs 473 B
test-utils/dist/testUtils.umd.js 555 B

compressed-size-action

@JoviDeCroock

Copy link
Copy Markdown
Member Author

The impact of this was a lot lower than I had hoped 😅

@JoviDeCroock JoviDeCroock deleted the proposal/remove-legacy-context branch July 5, 2026 16:44
@coveralls

Copy link
Copy Markdown

Coverage Status

coverage: 98.528%. remained the same — proposal/remove-legacy-context into main

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.

2 participants