We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Describe the bug The client_state is no longer a simple value in 0.6.8, so accessing it from the backend returns an internal dictionary of values.
To Reproduce
import reflex as rx cs = rx._x.client_state("cs", 0) class State(rx.State): def be_increment(self): return cs.retrieve(callback=State.do_increment) def do_increment(self, old_value): print(f"{old_value=}") return cs.push(old_value + 1) def counter() -> rx.Component: return rx.hstack( cs, # needed for 0.6.7 compatibility rx.button(f"Client Increment: {cs.value}", on_click=cs.set_value(cs.value + 1)), rx.button(f"Server Increment: {cs.value}", on_click=State.be_increment), )
Expected behavior Same behavior as 0.6.7: both client and server increment against the client_state var should work
Specifics (please complete the following information):
The text was updated successfully, but these errors were encountered:
ENG-4402 Backend client_state read/write broken in 0.6.8
Sorry, something went wrong.
adhami3310
Successfully merging a pull request may close this issue.
Describe the bug
The client_state is no longer a simple value in 0.6.8, so accessing it from the backend returns an internal dictionary of values.
To Reproduce
Expected behavior
Same behavior as 0.6.7: both client and server increment against the client_state var should work
Specifics (please complete the following information):
The text was updated successfully, but these errors were encountered: