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

Replace .rx.resolve and .rx.set_input with .rx.value property #856

Merged
merged 6 commits into from Sep 30, 2023

Conversation

philippjfr
Copy link
Member

@philippjfr philippjfr commented Sep 29, 2023

Overall this seems much cleaner. Some consequences:

  • We no longer allow setting the value of a non-root node of a reactive expression, i.e. (rx(1) + 1).value = 2 is invalid. This was always what was confusing and made naming this difficult.
  • We now automatically gain support for increment (i.e. .rx.value +=) and other arithmetic/boolean assignment operators

param/reactive.py Outdated Show resolved Hide resolved
param/reactive.py Outdated Show resolved Hide resolved
Copy link
Member

@jbednar jbednar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this really streamlines and clarifies usage. Thanks for making it happen!

param/reactive.py Outdated Show resolved Hide resolved
Copy link
Member

@maximlt maximlt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh yes that's a great API improvement, thanks @jbednar for making that suggestion, bye bye set_input and resolve!

Co-authored-by: James A. Bednar <jbednar@continuum.io>
@philippjfr philippjfr merged commit f1b5b41 into main Sep 30, 2023
10 checks passed
@philippjfr philippjfr deleted the reactive_value_getter_setter branch September 30, 2023 01:00
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.

None yet

3 participants