reflex/reflex/experimental/__init__.py
Masen Furer 89352ac10e
rx._x.client_state: react useState Var integration for frontend and backend (#3269)
New experimental feature to create client-side react state vars, save them in
the global `refs` object and access them in frontend rendering/event triggers
as well on the backend via call_script.
2024-05-16 13:20:26 -07:00

28 lines
778 B
Python

"""Namespace for experimental features."""
from types import SimpleNamespace
from reflex.components.props import PropsBase
from reflex.components.radix.themes.components.progress import progress as progress
from reflex.components.sonner.toast import toast as toast
from ..utils.console import warn
from . import hooks as hooks
from .client_state import ClientStateVar as ClientStateVar
from .layout import layout as layout
from .misc import run_in_thread as run_in_thread
warn(
"`rx._x` contains experimental features and might be removed at any time in the future .",
)
_x = SimpleNamespace(
client_state=ClientStateVar.create,
hooks=hooks,
layout=layout,
progress=progress,
PropsBase=PropsBase,
run_in_thread=run_in_thread,
toast=toast,
)