v0.4.4
Known Issues
py3.8 and py3.9 using @rx.page
with REDIS_URL
set:
RuntimeError: There is no current event loop in thread 'ThreadPoolExecutor-0_0'.
Breaking Changes
Component._get_vars
signature change
Unlikely to affect most users; however the signature of Component._get_vars
has changed to accept a new include_children
parameter which should either be handled internally or passed to super()._get_vars
if this function has been overridden in a custom component.
New signature
def _get_vars(self, include_children: bool = False) -> Iterator[Var]:
New Features
Expose lang
and other attributes on <html>
tag
- pass lang and custom_attrs from app to html root by @macmoritz in #2697
rx.upload
exposes on_drop
event trigger
Trigger upload immediately after files are selected by passing an rx.upload_files
-wrapped handler directly to on_drop
trigger.
rx.el.form
supports on_submit
event trigger
Improvements
Dependency Changes
- remove pipdeptree as reflex dep by @martinxu9 in #2763
- bump up httpx to >= 0.25.1 by @martinxu9 in #2782
Enable /_upload
when get_upload_url
is used
Previously, the rx.upload
component was the only thing that resulted in the endpoint being enabled.
Update docker-example
for more realistic deployments
-
a simple dual port
Dockerfile
-
compose.yaml
providing a separate backend container and static frontend served with automatic TLS- Support volumes for data and uploaded files
-
compose.prod.yaml
including postgres database and redis containers -
app.Dockerfile
for single container, single port deployment on a platform service like Render, Railway, and Google Cloud Run -
Include app.Dockerfile for deploying to container hosting platform by @masenf in #2784
Improve "Stateless" app detection
Apps which import State, but do not actually use it are considered stateless.
Apps that use rx.State.router
automatically work without defining a dummy substate.
Apps dynamically create state at runtime (#1877) correctly include used dynamic substates.
- Track state usage by @benedikt-bartscher in #2441
Better support for plain SQLAlchemy
- add support for sqlalchemy AssociationProxys by @benedikt-bartscher in #2809
reflex component
CLI improvements
-
Build and publish in a single step
-
Improved custom component template
-
More comprehensive
.gitignore
-
[REF-2141] Custom component command improvements by @martinxu9 in #2807
EventChain
list syntax is undeprecated
It is now acceptable to pass a list of multiple EventHandler
to an event trigger, such as on_click
.
Bug Fixes
- Fix Padding in Accordion component
- Update accordion.py by @FrankBold in #2759
- Skip node install if version requirements are met
- Fix infinite recursion when a substate named "state" has a computed var by @masenf in #2778
- Fix
/_upload
404 and missingon_load
handlers in production deployment - [REF-2087] Better rx.progress styling integration with radix themes by @masenf in #2762
- Updating initialize_gitignore() to avoid modifying the encoding of the .gitignore file by @cllatser in #2797
- Fix tab freezing and crash when
appearance="dark"
andtheme_panel=True
- [REF-2098] Allow overlay Close components to have on_click handlers by @masenf in #2793
Other Changes
- Perf improvements (part 1) by @masenf in #2779
- Unwrap images in rx.markdown by @picklelo in #2789
- [AppHarness] add webdriver option arguments via env by @benedikt-bartscher in #2783
New Contributors
- @FrankBold made their first contribution in #2759
- @ansuzgs made their first contribution in #2767
Full Changelog: v0.4.3...v0.4.4