Skip to content

Conversation

@JoviDeCroock
Copy link
Member

@JoviDeCroock JoviDeCroock commented May 24, 2025

Checking out the byte size impact of removing these lifecycles, we can remove componentWillUpdate as well due to #4760. 53b is a lower impact than I had expected, what do we think about this one?

@github-actions
Copy link

github-actions bot commented May 24, 2025

📊 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

@JoviDeCroock JoviDeCroock force-pushed the remove-lifecycles-core branch from 4cbe3fa to 259dfe0 Compare May 24, 2025 09:36
@github-actions
Copy link

github-actions bot commented May 24, 2025

Size Change: -120 B (-0.26%)

Total Size: 46.4 kB

Filename Size Change
dist/preact.js 4.6 kB -44 B (-0.95%)
dist/preact.mjs 4.62 kB -39 B (-0.84%)
dist/preact.umd.js 4.68 kB -37 B (-0.78%)
ℹ️ View Unchanged
Filename Size
compat/dist/compat.js 3.73 kB
compat/dist/compat.mjs 3.65 kB
compat/dist/compat.umd.js 3.79 kB
debug/dist/debug.js 3.85 kB
debug/dist/debug.mjs 3.85 kB
debug/dist/debug.umd.js 3.94 kB
devtools/dist/devtools.js 260 B
devtools/dist/devtools.mjs 271 B
devtools/dist/devtools.umd.js 346 B
hooks/dist/hooks.js 1.52 kB
hooks/dist/hooks.mjs 1.54 kB
hooks/dist/hooks.umd.js 1.59 kB
jsx-runtime/dist/jsxRuntime.js 861 B
jsx-runtime/dist/jsxRuntime.mjs 830 B
jsx-runtime/dist/jsxRuntime.umd.js 934 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 JoviDeCroock force-pushed the remove-lifecycles-core branch 2 times, most recently from ce917e1 to 230e39a Compare May 29, 2025 14:05
@JoviDeCroock
Copy link
Member Author

Going to close this for the time being as the win is small but we might want to revisit this

@JoviDeCroock JoviDeCroock deleted the remove-lifecycles-core branch May 29, 2025 14:09
@rschristian
Copy link
Member

Super late here, but I think we should go for it or revert dropping support for the UNSAFE_ prefix.

React 16.3 allowed & encouraged users to start using these prefixes and React 17.0 required used of them; as such, now that we've dropped support for the prefix in #4656, we only support 16.x components (and older) that never underwent the optional migration. This feels like a somewhat awkward middle ground for support and might be surprising to some users, if any are still using these methods, that is. If they aren't, well, -53b ain't bad.

@JoviDeCroock
Copy link
Member Author

@rschristian I support that, let's do it when we decide whether we revert deferred state settling though as the previous iteration does use componentWillUpdate 😅

@rschristian
Copy link
Member

Ah, that's why there's that revert commit, forgot we used to use that!

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