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

Use dependentKeyCompat for bindings #64

Merged
merged 2 commits into from
Mar 22, 2024
Merged

Use dependentKeyCompat for bindings #64

merged 2 commits into from
Mar 22, 2024

Conversation

dfreeman
Copy link
Member

Background

Components in a shared library of Exclaim implementations can't know up front whether they're going to be operating in an ExclaimUi with @useClassicReactivity set or not. While it's possible to just cut a breaking release of such libraries and assumed Octane reactivity, that doesn't provide a very nice migration path.

This Change

By applying dependentKeyCompat to the property descriptors we set up for $binds in the modern env, we make it so that they can safely be targeted as @computed dependencies. This means shared component libraries can safely use @computed as a lowest common denominator as their consumers slowly migrate away from classic reactivity, then switch to native getters and stop using @computed in a breaking release later on.

@dfreeman dfreeman merged commit d41abad into main Mar 22, 2024
9 checks passed
@dfreeman dfreeman deleted the dependent-key-compat branch March 22, 2024 16:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants