Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

JoviDeCroock
Copy link
Member

I've been hammering on a good way to allow for us to check the version of Preact in signals, however there hasn't really been a good one. I've come to terms with just checking whether we have _scuFromHooks so we can ship preactjs/signals#630.

The main reason why checking this is enough is that 10.12 - 10.24 would not benefit from sCU in signals being wiser either way. This because we weren't calling it either way, that got fixed in 10.25.0 by #4560.

This PR will allow us to check this.__f and when it's present in the sCU we know that we are dealing with a state settled update so we can avoid use the check introduced in preactjs/signals#630 and when we don't have this we'll leverage the old code path.

@coveralls
Copy link

Coverage Status

coverage: 99.618%. remained the same
when pulling 48098e9 on mangle-has-scu
into 1226aae on main.

@JoviDeCroock JoviDeCroock merged commit d16a34e into main Jan 10, 2025
7 checks passed
@JoviDeCroock JoviDeCroock deleted the mangle-has-scu branch January 10, 2025 14:51
@JoviDeCroock JoviDeCroock mentioned this pull request Feb 16, 2025
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