MCPcopy
hub / github.com/reflex-dev/reflex / set

Method set

reflex/experimental/client_state.py:248–258  ·  view source on GitHub ↗

Set the value of the client state variable. This property can only be attached to a frontend event trigger. To set a value from a backend event handler, see `push`. Returns: A special EventChain Var which will set the value when triggered.

(self)

Source from the content-addressed store, hash-verified

246
247 @property
248 def set(self) -> Var:
249 """Set the value of the client state variable.
250
251 This property can only be attached to a frontend event trigger.
252
253 To set a value from a backend event handler, see `push`.
254
255 Returns:
256 A special EventChain Var which will set the value when triggered.
257 """
258 return self.set_value()
259
260 def retrieve(self, callback: EventHandler | Callable | None = None) -> EventSpec:
261 """Pass the value of the client state variable to a backend EventHandler.

Callers 15

_initialize_appMethod · 0.45
_start_backendMethod · 0.45
_poll_for_serversMethod · 0.45
modify_stateMethod · 0.45
_runFunction · 0.45
runFunction · 0.45
exportFunction · 0.45
_skip_compileFunction · 0.45
deployFunction · 0.45
run_uvicorn_backendFunction · 0.45
run_granian_backendFunction · 0.45

Calls 1

set_valueMethod · 0.95

Tested by 3

_initialize_appMethod · 0.36
_start_backendMethod · 0.36
_poll_for_serversMethod · 0.36